The data used for this section come from Dorothy Espelage’s research on the effects of bullying. In this dataset children are nested within peer groups.
Table 1.1 presents the descriptive information of variables included in the analysis. Dataset has a total of 291 students or micro-units (level 1), nested in 54 peer groups or macro-units (level 2). The variables in the dataset include:
Table 1.1. Descriptive statistics Bully Data
| Variable | Stats / Values | Freqs (% of Valid) | Graph | Missing | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bully [numeric] |
|
33 distinct values | 0 (0.0%) | |||||||||||
| gender [character] |
|
|
0 (0.0%) | |||||||||||
| fight [numeric] |
|
21 distinct values | 0 (0.0%) | |||||||||||
| empathy [numeric] |
|
89 distinct values | 0 (0.0%) |
Generated by summarytools 1.0.0 (R version 4.1.2)
2021-12-01
First, we run an empty random intercept model (Model 1.0) where students are nested in peer groups and students’ fighting tendency as the dependent variable. This model takes the form:
Full Model \[ \begin{aligned} Y_{ij} = \gamma_{00} + U_{0j} + R_{ij} \end{aligned} \] The null model does not provide information regarding the effect of specific independent variables on the dependent, instead it does yield important information regarding how variation in \(Y_{ij}\) is partitioned between variance among individuals (\(var(R_{ij}) = \sigma^2\)) and variance among peer groups or clusters (\(var(U_{0j})= \tau_{0}^2\)). Additionally, in this framework, \(\gamma_{00}\) represents an average or general intercept value that holds across cluster.
| Model 1.0 | |||
|---|---|---|---|
| Predictors | Estimates | std.Error | p-value |
| Intercept | 1.49 *** | 0.08 | <0.001 |
| Random Effects | |||
| σ2 | 0.390 | ||
| τ00 peer | 0.244 | ||
| ICC | 0.384 | ||
| N peer | 54 | ||
| Observations | 291 | ||
| Marginal R2 / Conditional R2 | 0.000 / 0.384 | ||
|
|||
The variance of the random intercept \(\tau_{00}^{2}\) = 0.244 represent the variability in the students’ tendency to fight among peer groups. Table 1.3 shows the estimation of confidence intervals for all random effects.
Standard deviation of random intercept effect (\(.sig01\)) falls into the 95% confidence interval of (0.348 - 0.672), which does not include the \(0\) value so that we conclude that random slope of student’s fighting is an statistically significant effect.
Furthermore, the variance of the residual \(\sigma^{2}\), or variability within peer groups is 0.39. Also, the standard deviation of residual (\(.sigma\)) falls into the 95% confidence interval of (0.57 - 0.688), which does not include the \(0\) value.
Table 1.3. Confidence Interval for Null Model (Model 5.0)| 2.5 % | 97.5 % | |
|---|---|---|
| .sig01 | 0.3478397 | 0.6722720 |
| .sigma | 0.5703350 | 0.6884687 |
| (Intercept) | 1.3333922 | 1.6558256 |
Intraclass correlation coefficient (ICC) can be expressed as:
\[ \begin{aligned} ICC = \frac{\tau^2}{\tau^2 + \sigma^2} \end{aligned} \] According results of null model (model 0), the ICC is equal to:
\[ \begin{aligned} ICC = \frac{0.244}{0.244 + 0.390} = 0.384 \end{aligned} \] ICC indicates that 38.43% of total variance in students fighting is associated with their membership, thus there is a relative strong relationship among the students tendency to get into fights and their peer groups.
Another empty random intercept model (Model 1.1) was ran, where students are nested in peer groups, while students’ bullying score is the dependent variable. Table 1.4 presents the parameter estimation for Model 1.1.
| Model 1.1 | |||
|---|---|---|---|
| Predictors | Estimates | std.Error | p-value |
| Intercept | 1.69 *** | 0.07 | <0.001 |
| Random Effects | |||
| σ2 | 0.305 | ||
| τ00 peer | 0.205 | ||
| ICC | 0.401 | ||
| N peer | 54 | ||
| Observations | 291 | ||
| Marginal R2 / Conditional R2 | 0.000 / 0.401 | ||
|
|||
The variance of the random intercept \(\tau_{00}^{2}\) = 0.205 represent the variability in bullying among peer groups. Table 1.5 shows the estimation of confidence intervals for all random effects. Standard deviation of the random intercept effect (\(.sig01\)) falls into the 95% confidence interval of (1.544 - 1.833), which does not include the \(0\) value so that we conclude that random intercept of bully is a statistically significant effect.
Additionally, table 1.6 presents the an ANOVA-like table with tests of random-effect terms in the model, also confirmed that random intercept is statistically significant (p-value = 0). Furthermore, the variance of the residual \(\sigma^{2}\), or variability within peer groups is 0.305.
Table 1.5. Confidence Interval for Null Model (Model 1.1)
| 2.5 % | 97.5 % | |
|---|---|---|
| .sig01 | 0.3414178 | 0.5940527 |
| .sigma | 0.5056913 | 0.6065151 |
| (Intercept) | 1.5436323 | 1.8329887 |
Table 1.6. Anova-like Table for Random-Effects significance
| npar | logLik | AIC | LRT | Df | Pr(>Chisq) | |
|---|---|---|---|---|---|---|
| <none> | 3 | -278.0821 | 562.1641 | NA | NA | NA |
| (1 | peer) | 2 | -306.8864 | 617.7728 | 57.60874 | 1 | 0 |
Intraclass correlation coefficient (ICC) for model 1.1 is:
\[ \begin{aligned} ICC = \frac{0.205}{0.205 + 0.305} = 0.401 \end{aligned} \]
ICC indicates that 40.14% of total variance in students bullying behavior is relative strong relate with their peer groups.
Two new grand mean centered variables were created: cfight and cempathy for the students’ tendency to get into fighting and empathy, respectively. Table 1.7 presents the descriptive statistics for these new variables, which were calculated by subtracting the sample mean from each individual raw score, implying that the mean for the sample of the centered variables is 0, and each individual’s (centered) score represents a deviation from the mean.
Table 1.7. Descriptive Grand Center Variables for Flight (cfight) and Emphaty (cempathy)
| Variable | Stats / Values | Freqs (% of Valid) | Graph | Missing | ||||
|---|---|---|---|---|---|---|---|---|
| cfight [numeric] |
|
21 distinct values | 0 (0.0%) | |||||
| cempathy [numeric] |
|
89 distinct values | 0 (0.0%) |
Generated by summarytools 1.0.0 (R version 4.1.2)
2021-12-01
A random intercept model (Model 1.2), where students are nested in peer groups, with cfight and cempathy as the explanatory variables, and bullying behavior as the dependent variable was ran. This model can be also expressed in two separates level as:
Level 1
\[ \begin{aligned} Y_{ij} = \beta_{0} + \beta_{1}cfight+\beta_{2}cempathy + R_{ij} \end{aligned} \]
\[ \begin{aligned} \beta_{1} = \gamma_{10} \end{aligned} \]
\[ \begin{aligned} \beta_{2} = \gamma_{20} \end{aligned} \]
Level 2
\[ \begin{aligned} \beta_{0} = \gamma_{00} + U_{0j} \end{aligned} \]
Full Model
\[ \begin{aligned} Y_{ij} = \gamma_{00} + \gamma_{10}cfight_{i} + \gamma_{20}cempathy_{i} + U_{0j} + R_{ij} \end{aligned} \]
Table 1.8 presents the parameter estimation for model 1.2 an the comparison with model 1.1
| Model 1.1 | Model 1.2 | |||||
|---|---|---|---|---|---|---|
| Predictors | Estimates | std.Error | p-value | Estimates | std.Error | p-value |
| Intercept | 1.69 *** | 0.07 | <0.001 | 1.64 *** | 0.04 | <0.001 |
| Fight (Centered) | 0.49 *** | 0.04 | <0.001 | |||
| Empathy (Centered) | -0.09 *** | 0.01 | <0.001 | |||
| Random Effects | ||||||
| σ2 | 0.305 | 0.176 | ||||
| τ00 | 0.205 peer | 0.064 peer | ||||
| N | 54 peer | 54 peer | ||||
| Observations | 291 | 291 | ||||
| Marginal R2 / Conditional R2 | 0.000 / 0.401 | 0.485 / 0.622 | ||||
|
||||||
The variance of the random intercept \(\tau_{00}^{2}\) = 0.064 represents the variability in bullying among peer groups after included students’ tendency to get into fighting and empathy as explanatory variables for level 1. The variance of the random intercept has decreased by 68.64% in comparison to Model Null (Model 1) from (0.205 to 0.064).
Furthermore, Table 1.9 shows the estimation of confidence intervals for all random effects. Random intercept effect (\(.sig01\)) falls into the 95% confidence interval of (0.176 - 0.345), which does not include the \(0\) value so that we conclude that random intercept is an statistically significant effect.
Table 1.9. Confidence Interval for Model 1.2
| 2.5 % | 97.5 % | |
|---|---|---|
| .sig01 | 0.1761094 | 0.3451431 |
| .sigma | 0.3845005 | 0.4607648 |
| (Intercept) | 1.5472299 | 1.7257633 |
| cfight | 0.4065202 | 0.5647371 |
| cempathy | -0.1148117 | -0.0583863 |
According to results presented in Table 1.8, both variables are statistically significant for predicting students’ bullying behavior (\(p-value \le 0.001\)). However, there are differences in the direction of effect between these two explanatory variables. In that sense, cfigth has a positive effect on students’ bully, Thus, when students’ tendency to get into fights increases one unite above the sample mean, the students’ bully increased by 0.486 points. On the other hand, cempathy has a negative effect on students’ bullying; therefore when students’ empathy increase one unite above the sample mean the bullying decreased in 0.087 points.
A random intercept model (Model 1.3), where students are nested in peer groups, with gender, cfight, cempathy as the explanatory variables, and bully as the dependent variable was conducted. This model can be also expressed in two separates level as:
Level 1
\[ \begin{aligned} Y_{ij} = \beta_{0} + \beta_{1}cfight+\beta_{2}cempathy + \beta_{3}gender + R_{ij} \end{aligned} \] \[ \begin{aligned} \beta_{1} = \gamma_{10} \end{aligned} \]
\[ \begin{aligned} \beta_{2} = \gamma_{20} \end{aligned} \] \[ \begin{aligned} \beta_{3} = \gamma_{30} \end{aligned} \] Level 2
\[ \begin{aligned} \beta_{0} = \gamma_{00} + U_{0j} \end{aligned} \]
Full Model
\[ \begin{aligned} Y_{ij} = \gamma_{00} + \gamma_{10}cfight_{i} + \gamma_{20}cempathy_{i} + \gamma_{30}gender_{i} + U_{0j} + R_{ij} \end{aligned} \]
Table 1.10 presents the estimation for model 1.3 in comparison to previous models.
| Model 1.1 | Model 1.2 | Model 1.3 | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Predictors | Estimates | std.Error | p-value | Estimates | std.Error | p-value | Estimates | std.Error | p-value |
| Intercept | 1.69 *** | 0.07 | <0.001 | 1.64 *** | 0.04 | <0.001 | 1.59 *** | 0.06 | <0.001 |
| Fight (Centered) | 0.49 *** | 0.04 | <0.001 | 0.48 *** | 0.04 | <0.001 | |||
| Empathy (Centered) | -0.09 *** | 0.01 | <0.001 | -0.08 *** | 0.01 | <0.001 | |||
| Gender (Male) | 0.09 | 0.09 | 0.288 | ||||||
| Random Effects | |||||||||
| σ2 | 0.305 | 0.176 | 0.177 | ||||||
| τ00 | 0.205 peer | 0.064 peer | 0.061 peer | ||||||
| ICC | 0.401 | 0.267 | 0.257 | ||||||
| N | 54 peer | 54 peer | 54 peer | ||||||
| Observations | 291 | 291 | 291 | ||||||
| Marginal R2 / Conditional R2 | 0.000 / 0.401 | 0.485 / 0.622 | 0.500 / 0.628 | ||||||
|
|||||||||
According to results, gender is a not a statistically significant predictor of bullying (\(\gamma_{30}\) = 0.095, p-value = 0.29). Therefore, boys does not showed a significantly stronger effect on bullying behavior compared to girls.
Model 1.4 includes gender, students’ tendency to get into fighting, and empathy as fixed predictors of students bullying. Also, the model adds a random slope effect for students’ tendency to fight (\(U_{1j}*cfight_{i}\)). This model can be defined using the following form:
Level 1
\[ \begin{aligned} Y_{ij} = \beta_{0} + \beta_{1}cfight+\beta_{2}cempathy + \beta_{3}gender + R_{ij} \end{aligned} \] \[ \begin{aligned} \beta_{1} = \gamma_{10}+ U_{1j} \end{aligned} \]
\[ \begin{aligned} \beta_{2} = \gamma_{20} \end{aligned} \] \[ \begin{aligned} \beta_{3} = \gamma_{30} \end{aligned} \] Level 2
\[ \begin{aligned} \beta_{0} = \gamma_{00} + U_{0j} \end{aligned} \]
Full Model
\[ \begin{aligned} Y_{ij} = \gamma_{00} + \gamma_{10}cfight_{i} + \gamma_{20}cempathy_{i} + \gamma_{30}gender_{i} + U_{1j}*cfight_{i} + U_{0j} + R_{ij} \end{aligned} \]
Table 1.11 presents the results for random intercept and random slope model.
| Random Intercept (Model 1.3) | Random Slope (Model 1.4) | |||||
|---|---|---|---|---|---|---|
| Predictors | Estimates | std.Error | p-value | Estimates | std.Error | p-value |
| Intercept | 1.59 *** | 0.06 | <0.001 | 1.60 *** | 0.05 | <0.001 |
| Fight (Centered) | 0.48 *** | 0.04 | <0.001 | 0.48 *** | 0.06 | <0.001 |
| Empathy (Centered) | -0.08 *** | 0.01 | <0.001 | -0.08 *** | 0.01 | <0.001 |
| Gender (Male) | 0.09 | 0.09 | 0.288 | 0.07 | 0.08 | 0.326 |
| Random Effects | ||||||
| σ2 | 0.177 | 0.163 | ||||
| τ00 | 0.061 peer | 0.048 peer | ||||
| τ11 | 0.048 peer.cfight | |||||
| ρ01 | 0.883 peer | |||||
| N | 54 peer | 54 peer | ||||
| Observations | 291 | 291 | ||||
| Marginal R2 / Conditional R2 | 0.500 / 0.628 | 0.494 / 0.653 | ||||
|
||||||
The variance for the random slope (\(\tau_{11}\)) is equal to 0.0476.
Table 1.12 shows the estimation of confidence intervals for all radom and fixed effects in Model 1.4. Random slope effect (\(.sig03\)) falls into the 95% confidence interval of (0.103 - 0.37), which does not include the 0 value. Consequently, we conclude that random slope of grand-centered tendency of fight on bullying is a statistically significant effect, in other words the effect of tendency of get into fighting vary between peer groups. Additionally, table 1.13 presents the an ANOVA-like table with tests of random-effect terms for the model, which also confirmed that random slope effect of students’ tendency to fight is statistically significant (p-value = 0).
Table 1.12. Confidence Interval for Model 1.4 ~ Random Slope
| 2.5 % | 97.5 % | |
|---|---|---|
| .sig01 | 0.1503942 | 0.2998642 |
| .sig02 | 0.3802380 | 1.0000000 |
| .sig03 | 0.1034087 | 0.3703419 |
| .sigma | 0.3692161 | 0.4435446 |
| (Intercept) | 1.4948749 | 1.7064237 |
| cfight | 0.3546925 | 0.6148865 |
| cempathy | -0.1103967 | -0.0530348 |
| gendermale | -0.0762582 | 0.2243220 |
Table 1.13. Anova-like Table for Random-Effects significance
| npar | logLik | AIC | LRT | Df | Pr(>Chisq) | |
|---|---|---|---|---|---|---|
| <none> | 8 | -178.2680 | 372.536 | NA | NA | NA |
| cfight in (1 + cfight | peer) | 6 | -186.6965 | 385.393 | 16.857 | 2 | 0.0002185 |
This section analyze a subset of the NELS data set, in which are included only 519 students nested in 23 schools. Variables for level 1 (students) are:
School level variable includes:
Table 2.1 Descriptive statistics NELS Data
| Variable | Stats / Values | Freqs (% of Valid) | Graph | Missing | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| math [numeric] |
|
42 distinct values | 0 (0.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| homework [numeric] |
|
|
0 (0.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| minority [numeric] |
|
|
0 (0.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ses [numeric] |
|
248 distinct values | 0 (0.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| gender [character] |
|
|
0 (0.0%) |
Generated by summarytools 1.0.0 (R version 4.1.2)
2021-12-01
An empty random intercept model (Model 2.0) where students are nested in schools and math score as the dependent variable was ran. This model takes the form:
Full Model \[ \begin{aligned} Y_{ij} = \gamma_{00} + U_{0j} + R_{ij} \end{aligned} \] In this framework, \(Y_{ij}\) is the math score, \(\gamma_{00}\) represents the math score average or general intercept value that holds across schools, while \(U_{0j}\) and \(R_{ij}\) are the random intercept and residual. These random effects are normally distributed with mean 0 and variance \(\tau_{0}^2\) and \(\sigma^2\), respectively.
Table 2.2 presents the results for Null Model.
| Model 2.0 | |||
|---|---|---|---|
| Predictors | Estimates | std.Error | p-value |
| Intercept | 50.76 *** | 1.13 | <0.001 |
| Random Effects | |||
| σ2 | 81.237 | ||
| τ00 id | 24.851 | ||
| ICC | 0.234 | ||
| N id | 23 | ||
| Observations | 519 | ||
| Marginal R2 / Conditional R2 | 0.000 / 0.234 | ||
|
|||
The variance of the random intercept \(\tau_{00}^{2}\) = 24.851 represent the variability in math scores among schools. Table 2.3 shows the estimation of confidence intervals for random intercept and residuals.
Standard deviation of random intercept (\(.sig01\)) falls into the 95% confidence interval of (3.635 - 7.104), which does not include the \(0\) value, so that we conclude that random intercept of math scores is an statistically significant effect. Additionally, table 2.4 presents the tests of random-effect terms for null model (model 2.0), which also confirmed that random intercept is statistically significant (p-value = 0).
Furthermore, the variance of residual \(\sigma^{2}\), or variability within schools is 81.237. Also, the standard deviation of residual (\(.sigma\)) falls into the 95% confidence interval of (8.481 - 9.604), which does not include the \(0\) value.
Table 2.3. Confidence Interval for Null Model (Model 2.0)
| 2.5 % | 97.5 % | |
|---|---|---|
| .sig01 | 3.635301 | 7.104293 |
| .sigma | 8.480625 | 9.603809 |
| (Intercept) | 48.462172 | 53.063989 |
Table 2.4. Anova-like Table for Random-Effects significance (Model 2.0)
| npar | logLik | AIC | LRT | Df | Pr(>Chisq) | |
|---|---|---|---|---|---|---|
| <none> | 3 | -1900.388 | 3806.776 | NA | NA | NA |
| (1 | id) | 2 | -1966.532 | 3937.064 | 132.2877 | 1 | 0 |
\[ \begin{aligned} ICC = \frac{\tau^2}{\tau^2 + \sigma^2} \end{aligned} \] According results of null model (model 2.0), the Intraclass correlation coefficient (ICC) is equal to:
\[ \begin{aligned} ICC = \frac{24.851}{81.237 + 24.851} = 0.234 \end{aligned} \] ICC indicates that 23.42% of total variance in math score is associated with students’ school membership.
A a new variable named chomework as the grand mean centered variable for time that students spend doing homework was created. Table 2.5 presents the descriptive statistics for this new variable.
Table 2.5. Descriptive Grand-mean center Variables for Homework (chomework)
| Variable | Stats / Values | Freqs (% of Valid) | Graph | Missing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| chomework [numeric] |
|
|
0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generated by summarytools 1.0.0 (R version 4.1.2)
2021-12-01
A random intercept model was run. Model 2.1 predicts math score using chomework, gender, and ses as explanatory variables for level 1. This model can be also expressed in two separates level as:
Level 1
\[ \begin{aligned} Y_{ij} = \beta_{0} + \beta_{1}gender+\beta_{2}ses + \beta_{3}chomework + R_{ij} \end{aligned} \]
\[ \begin{aligned} \beta_{1} = \gamma_{10} \end{aligned} \]
\[ \begin{aligned} \beta_{2} = \gamma_{20} \end{aligned} \] \[ \begin{aligned} \beta_{3} = \gamma_{30} \end{aligned} \]
Level 2
\[ \begin{aligned} \beta_{0} = \gamma_{00} + U_{0j} \end{aligned} \]
Full Model
\[ \begin{aligned} Y_{ij} = \gamma_{00} + \gamma_{10}gender_{i} + \gamma_{20}ses_{i} + \gamma_{30}chomework_{i} + U_{0j} + R_{ij} \end{aligned} \]
Table 2.6 presents the parameter estimation for model 2.1 in comparison to model 2.0.
| Model 2.0 | Model 2.1 | |||||
|---|---|---|---|---|---|---|
| Predictors | Estimates | std.Error | p-value | Estimates | std.Error | p-value |
| Intercept | 50.76 *** | 1.13 | <0.001 | 51.14 *** | 0.88 | <0.001 |
| Gender (Male) | 0.58 | 0.74 | 0.429 | |||
| SES | 3.68 *** | 0.54 | <0.001 | |||
| Homework (Centered) | 2.18 *** | 0.27 | <0.001 | |||
| Random Effects | ||||||
| σ2 | 81.237 | 66.664 | ||||
| τ00 | 24.851 id | 11.215 id | ||||
| N | 23 id | 23 id | ||||
| Observations | 519 | 519 | ||||
| Marginal R2 / Conditional R2 | 0.000 / 0.234 | 0.260 / 0.366 | ||||
|
||||||
The variance of the random intercept \(\tau_{00}^{2}\) = 11.215 represents the variability in math scores among schools after included gender, ses, and homework frequency (grand-centered) as explanatory variables for level 1. The variance of the random intercept has decreased by 54.87% in comparison to Model Null (Model 2.0) from (24.851 to 11.215).
Furthermore, Table 2.7 shows the estimation of confidence intervals for all random effects. Random intercept effect (\(.sig01\)) falls into the 95% confidence interval of (2.253 - 4.98), which does not include the \(0\) value so that we conclude that random intercept is an statistically significant effect.
Table 2.7. Confidence Interval for Model 1.2
| 2.5 % | 97.5 % | |
|---|---|---|
| .sig01 | 2.2529255 | 4.980092 |
| .sigma | 7.6814121 | 8.701149 |
| (Intercept) | 49.3688228 | 52.915403 |
| genderMale | -0.8656687 | 2.032620 |
| ses | 2.5964436 | 4.751864 |
| chomework | 1.6459609 | 2.705066 |
According to results display in Table 2.6 , gender is not an statistically significant effect on math score (\(\gamma_{10}\) = 0.584, p-value = 0.429). In contrast, grand-mean centered social economic statuses (\(\gamma_{20}\) = 3.678, p-value = 0) and time that students spent on homework (\(\gamma_{30}\) = 2.176, p-value = 0) are statistically significant predictors of students’ math scores.
Thus, when students’ SES and time spend on homework increase in one unite above the sample mean of each variable, the students’ math scores increased by 3.678 and 2.176 points, respectively.
Model 2.2, which adds the fixed effect of minority, explanatory variable at school level, to Model 2.1 was conducted. This model can be formulated as:
Level 1
\[ \begin{aligned} Y_{ij} = \beta_{0} + \beta_{1}gender+\beta_{2}ses + \beta_{3}chomework + R_{ij} \end{aligned} \] \[ \begin{aligned} \beta_{1} = \gamma_{10} \end{aligned} \]
\[ \begin{aligned} \beta_{2} = \gamma_{20} \end{aligned} \]
\[ \begin{aligned} \beta_{3} = \gamma_{30} \end{aligned} \]
Level 2
\[ \begin{aligned} \beta_{0} = \gamma_{00} + \gamma_{01}minority + U_{0j} \end{aligned} \] Full Model
\[ \begin{aligned} Y_{ij} = \gamma_{00} + \gamma_{10}gender_{i} + \gamma_{20}ses_{i} + \gamma_{30}chomework_{i} + \gamma_{01}minority_{j} + U_{0j} + R_{ij} \end{aligned} \]
Table 2.7 presents the parameter estimation for model 2.2 and the comparison with previous models.
| Model 2.0 | Model 2.1 | Model 2.2 | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Predictors | Estimates | std.Error | p-value | Estimates | std.Error | p-value | Estimates | std.Error | p-value |
| Intercept | 50.76 *** | 1.13 | <0.001 | 51.14 *** | 0.88 | <0.001 | 53.25 *** | 1.10 | <0.001 |
| Gender (Male) | 0.58 | 0.74 | 0.429 | 0.59 | 0.74 | 0.420 | |||
| SES | 3.68 *** | 0.54 | <0.001 | 3.65 *** | 0.53 | <0.001 | |||
| Homework (Centered) | 2.18 *** | 0.27 | <0.001 | 2.20 *** | 0.27 | <0.001 | |||
| Minority | -0.89 ** | 0.32 | 0.006 | ||||||
| Random Effects | |||||||||
| σ2 | 81.237 | 66.664 | 66.511 | ||||||
| τ00 | 24.851 id | 11.215 id | 8.013 id | ||||||
| N | 23 id | 23 id | 23 id | ||||||
| Observations | 519 | 519 | 519 | ||||||
| Marginal R2 / Conditional R2 | 0.000 / 0.234 | 0.260 / 0.366 | 0.291 / 0.368 | ||||||
|
|||||||||
The effect of school minority status is negative and statistically significant (\(\gamma_{01}\) = -0.889, p-value = 0.011) on mathematics performance. Therefore, attending a school with a lower level of minority (minority = 1) predicts a reduction in the student performance in mathematics in 0.889 while attending a school with a extremely high level of minority (minority = 7) predicts a decreased on math score in 6.222 points.
An additional random intercept model (Model 2.3) for estimating mathematics score was ran. This model add a cross-level interaction term between SES and minority to previous model (Model 2.2) (\(\gamma_{21}ses*minority\)). Table 2.8 presents the estimation for model 2.3, which can be formulated as:
Full Model
\[ \begin{aligned} Y_{ij} = \gamma_{00} + \gamma_{10}gender_{i} + \gamma_{20}ses_{i} + \gamma_{21}ses*minority + \gamma_{30}chomework_{i} + \gamma_{01}minority_{j} + U_{0j} + R_{ij} \end{aligned} \]
| Model 2.3 | |||
|---|---|---|---|
| Predictors | Estimates | std.Error | p-value |
| Intercept | 53.61 *** | 1.07 | <0.001 |
| Gender (Male) | 0.76 | 0.73 | 0.300 |
| SES | 5.66 *** | 0.87 | <0.001 |
| Homework (Centered) | 2.19 *** | 0.27 | <0.001 |
| Minority | -1.12 *** | 0.32 | 0.001 |
| Interaction SES:Minority | -0.70 ** | 0.25 | 0.004 |
| Random Effects | |||
| σ2 | 65.660 | ||
| τ00 id | 7.224 | ||
| N id | 23 | ||
| Observations | 519 | ||
| Marginal R2 / Conditional R2 | 0.302 / 0.371 | ||
|
|||
The effect of interaction between SES and minority is negative (\(\gamma_{21}\) =-0.705) and statistically significant (p-value = 0.004).
Model estimation (Table 2.8) shows that the students’ SES is significantly related to math score (\(\gamma_{20}\) = 5.657, p-value = 0). Thus students with SES above the sample mean in one unit had a math achievement score approximately 5.657 points higher than those with SES equal to sample mean. These “main effects” should be interpreted in light of the significant cross-level interaction, however. The effects of SES on math scores depended on whether the student attend to a school with lower or higher minority status (\(\gamma_{21}\) = -0.705, p-value = 0.004).
Figure 1, which plots the interaction, shows that SES was more strongly related to math achievement for students in schools with a lower proportion of minority students than schools with a high proportion of minorities. For example, for students with a higher SES (2.0) who attend a school with no minority students, the total SES effect on math score is \(11.32\). In contrast, for students with the same level of SES who attend a school with an extremely higher proportion of minority students, the total SES effect on math score is \(1.52\).
An additional slope intercept model (Model 2.4) for estimating mathematics score was ran. This model add adds a random slope effect of chomework to previous model (\(\gamma_{30}*U_{3j}\)). Table 2.9 presents the results for random slope model, which can be also expressed as:
Full Model
\[ \begin{aligned} Y_{ij} = \gamma_{00} + \gamma_{10}gender_{i} + \gamma_{20}ses_{i} + \gamma_{21}ses*minority + \gamma_{30}chomework_{i} + \gamma_{30}*U_{3j} + \gamma_{01}minority_{j} + U_{0j} + R_{ij} \end{aligned} \]
| Model 2.4 | |||
|---|---|---|---|
| Predictors | Estimates | std.Error | p-value |
| Intercept | 52.30 *** | 1.20 | <0.001 |
| Gender (Male) | 0.46 | 0.67 | 0.494 |
| SES | 3.90 *** | 0.82 | <0.001 |
| Homework (Centered) | 1.89 * | 0.80 | 0.019 |
| Minority | -0.80 * | 0.35 | 0.024 |
| Interaction SES:Minority | -0.38 | 0.23 | 0.097 |
| Random Effects | |||
| σ2 | 51.263 | ||
| τ00 id | 12.034 | ||
| τ11 id.chomework | 12.763 | ||
| ρ01 id | 0.432 | ||
| N id | 23 | ||
| Observations | 519 | ||
| Marginal R2 / Conditional R2 | 0.181 / 0.541 | ||
|
|||
The variance for the random slope (\(\tau_{11}\)) is equal to 12.763.
Table 2.10 shows the estimation of confidence intervals for all random and fixed effects in Model 2.4. Random slope effect (\(.sig03\)) falls into the 95% confidence interval of (2.531 - 5.173), which does not include the 0 value. Consequently, we conclude that random slope of time that students spent on homework (grand-centered) on math score is a statistically significant effect, in other words the effect of time spend doing homework vary between schools. Additionally, table 2.11 presents the ANOVA-like table with tests of random-effect terms for the model, which also confirmed that random slope effect of chomework is statistically significant (p-value = 0).
Table 2.10. Confidence Interval for Model 2.4 ~ Random Slope
| 2.5 % | 97.5 % | |
|---|---|---|
| .sig01 | 2.4135883 | 5.0809625 |
| .sig02 | -0.0549633 | 0.7552739 |
| .sig03 | 2.5311553 | 5.1729381 |
| .sigma | 6.7253687 | 7.6432976 |
| (Intercept) | 49.8484611 | 54.7224089 |
| genderMale | -0.8533616 | 1.7666603 |
| ses | 2.2385625 | 5.5549805 |
| chomework | 0.2221480 | 3.5210685 |
| minority | -1.5170527 | -0.0817558 |
| ses:minority | -0.8465098 | 0.0773687 |
Table 2.11. Anova-like Table for Random-Effects significance
| npar | logLik | AIC | LRT | Df | Pr(>Chisq) | |
|---|---|---|---|---|---|---|
| <none> | 10 | -1801.489 | 3622.978 | NA | NA | NA |
| chomework in (1 + chomework | id) | 8 | -1836.044 | 3688.087 | 69.10961 | 2 | 0 |