The popularity dataset consists of data of 2000 students in 100 schools. The outcome variable is the student popularity, a popularity rating on a scale of 1–10 derived by a sociometric procedure. Generally, a sociometric procedure asks all students in a class to rate all the other students, and then assigns the average received popularity rating to each student. Because of the sociometric procedure, group effects as apparent from higher-level variance components are rather strong.

Some explanatory variables are student gender (boy = 0, girl = 1), student extraversion (10-point scale; 1 = not extraverted, 10 = extremely extraverted), and teacher experience in years.

Analyze this dataset by following the instructions below and answer the corresponding questions:

1. List all the variables at level 1 and level 2,

Table 1 presents the descriptive information for variables included in the analysis. Students who represent micro-unites (level 1) are nested in classes or macro-units (level 2) in this dataset.

Variables include in level 1 are:

Additional to class ID, level 2 include a variable of years of teaching experience (texp) range from \(2\) to \(25\) (Mean = \(14.3\), S.D =\(6.6\)). Table 1, presents the descriptive statistics for variables including in the analysis.

Table 1 Descriptive statistics Popularity Dataset

Variable Stats / Values Freqs (% of Valid) Graph Missing
gender [numeric]
Min : 0
Mean : 0.5
Max : 1
0:989(49.5%)
1:1011(50.5%)
0 (0.0%)
extrav [numeric]
Mean (sd) : 5.2 (1.3)
min ≤ med ≤ max:
1 ≤ 5 ≤ 10
Q1 - Q3 : 4 - 6
1:3(0.1%)
2:13(0.7%)
3:119(5.9%)
4:423(21.1%)
5:688(34.4%)
6:478(23.9%)
7:194(9.7%)
8:58(2.9%)
9:18(0.9%)
10:6(0.3%)
0 (0.0%)
texp [numeric]
Mean (sd) : 14.3 (6.6)
min ≤ med ≤ max:
2 ≤ 15 ≤ 25
Q1 - Q3 : 8 - 20
24 distinct values 0 (0.0%)
popular [numeric]
Mean (sd) : 5.1 (1.4)
min ≤ med ≤ max:
0 ≤ 5.1 ≤ 9.5
Q1 - Q3 : 4.1 - 6
85 distinct values 0 (0.0%)

Generated by summarytools 1.0.0 (R version 4.1.2)
2021-11-09

2. Hierachical Linear Models

2.1 Null model (model3.0)

A null model was ran to estimate both the population variance of students popularity between class (\(\tau_{00}\)) and the population variance within classes (\(\sigma^{2}\)). Table 2 presents the results of the null model.

According to results, \(36.2%\) of population variance in the students’ popularity is explained by the class characteristics (level 2 or macro-level)

Table 2. Null Model. Student Popularity
  Null Model
Predictors Estimates std.Error p-value
Intercept 5.08 *** 0.09 <0.001
Random Effects
σ2 1.22
τ00 class 0.69
ICC 0.36
N class 100
Observations 2000
Marginal R2 / Conditional R2 0.000 / 0.362
  • p<0.05   ** p<0.01   *** p<0.001

Tables 3 presents the estimation of confidence intervals for the standard deviation of random intercept. Results indicate that confidence intervals do not include the \(0\) so that the variation of intercepts between classes is statistically significant.

Table 3. Confidence Interval for Null Model random effects
2.5 % 97.5 %
.sig01 0.719963 0.9744636
.sigma 1.071113 1.1414463
(Intercept) 4.905780 5.2499439

2.2 Random intercept model plus level 1 fixed effect (model3.1)

Table 4 presents the estimation of the random intercept model (model3.1), where students are nested in class, and level 1 variables extraversion and gender are entered as the explanatory variables and popularity as the dependent variable in the model.

Table 4. Comparison Null Model (1.0) vs. Random Effect Model (1.1)
  Null Mode (3.0) Random Effect (3.1)
Predictors Estimates std.Error p-value Estimates std.Error p-value
Intercept 5.08 *** 0.09 <0.001 2.14 *** 0.12 <0.001
Gender (1=Boy) 1.25 *** 0.04 <0.001
Extraversion 0.44 *** 0.02 <0.001
Random Effects
σ2 1.22 0.59
τ00 0.69 class 0.62 class
N 100 class 100 class
Observations 2000 2000
Marginal R2 / Conditional R2 0.000 / 0.362 0.387 / 0.701
  • p<0.05   ** p<0.01   *** p<0.001

Additionally, Table 5 shows the estimation of confidence intervals. Results indicate that confidence intervals do not include the \(0\), so that both random and fixed effects are significant.

Table 5. Confidence Interval for Random effects and fixed effect for level 1 (Model 1.1)
2.5 % 97.5 %
.sig01 0.6842566 0.9169771
.sigma 0.7452365 0.7941850
(Intercept) 1.9104361 2.3707369
gender 1.1796956 1.3266282
extrav 0.4097002 0.4732970

a. What is \(\tau_{00}^{2}\), the variance of the random intercept? And what is \(\sigma^{2}\), the variance of the residual?

The variance of the random intercept (\(\tau_{00}^{2}\) = \(0.62\)) represent the variability between groups, which showed a slight reduction to Null Model (\(0.62\) vs. \(0.69\)) due to model 3.1 did not include any explanatory variable for group level. This random effect is statistically, suggesting that there is statistically significant variation in intercepts between schools.

The variance of the residual (\(\sigma^{2}\) = \(0.59\)) or variability within groups showed decreased respect null model (\(1.22\) to \(0.59\)), which means that Gender and Student’s Extraversion variables are important for explaining the variability within groups.

b. Are the effects of students’ extraversion and gender on popularity significant? If so, report the p-values.

Effects of student’ extraversion and gender are both positive and statistically significant (p-value <0.001). Thus, being a boy increases the popularity by \(1.25\) points, while increasing one unit in a student’s extraversion score increases the popularity by \(0.44\) points.

2.3 Random intercept model plus level 1 fixed effect (model3.3)

Run model3.2, which adds a level 2 variable teacher’s experiences (texp) to model1.1

Table 6 presents the estimation of random intercept model (model3.2), where variable teacher’s experiences (texp) was included as an explanatory variable for level 2.

Table 6. Comparison Null Model (1.0) vs. Random Models (1.1 and 1.2)
  Null Model 1.0 Model 1.1 Model 1.2
Predictors Estimates std.Error p-value Estimates std.Error p-value Estimates std.Error p-value
Intercept 5.08 *** 0.09 <0.001 2.14 *** 0.12 <0.001 0.81 *** 0.17 <0.001
Gender (1=Boy) 1.25 *** 0.04 <0.001 1.25 *** 0.04 <0.001
Extraversion 0.44 *** 0.02 <0.001 0.45 *** 0.02 <0.001
Teacher experience (years) 0.09 *** 0.01 <0.001
Random Effects
σ2 1.22 0.59 0.59
τ00 0.69 class 0.62 class 0.29 class
ICC 0.36 0.51 0.33
N 100 class 100 class 100 class
Observations 2000 2000 2000
Marginal R2 / Conditional R2 0.000 / 0.362 0.387 / 0.701 0.511 / 0.671
  • p<0.05   ** p<0.01   *** p<0.001

Tables 7 shows the estimation of confidence intervals for model 3.2. Results indicate that confidence intervals does not include the \(0\), so that both random and fixed effects for level 1 and 2 are statistically significant.

Table 7. Confidence Interval for Random effects and fixed effect for level 1 and 2 (Model 1.2)
2.5 % 97.5 %
.sig01 0.6842566 0.9169771
.sigma 0.7452365 0.7941850
(Intercept) 1.9104361 2.3707369
gender 1.1796956 1.3266282
extrav 0.4097002 0.4732970

a. What is \(\tau_{00}^{2}\) from model1.2? How much does it decrease or increase from model1.1?

The variance of the random intercept (\(\tau_{00}^{2}\) = \(0.29\)) represents the variability between groups, which showed a decreased respect to both Null Model and Model 3.1 (\(0.62\) vs. \(0.29\)) after included teachers’ experience as an explanatory variable for level 2 (macro-level or group). This random effect is statistically, suggesting that there is statistically significant variation in intercepts between schools.

The variance between (\(\tau_{00}^{2}\)) groups decreased by 57.97% after including teachers’ experience as an explanatory variable for level 2. Also, adding this variable drops ICC by 8.33% in comparison to Null Model

b. What is the effect of teacher’s experience on students’ popularity? How would you interpret the effect?

Effect of teachers’ experience on students’ popularity is positive and statistically significant (p-value <0.001). Thus, an increase in one year of teachers’ experience increases the students’ popularity by \(0.09\) points.