Multilevel Analysis Dashboard: Factors Affecting Students’ Mathematics Achievement

Padjadjaran Statistics Olympiad · Final Round (RASIO)

Team Name: Astral Express Participant Number: 003SO2026 Members: Gregorius Adiyatma Pradana & Febrianggi Caesar Immanuel
900 students 30 schools Linear Mixed Models Models M1–M4

BackgroundContext and objective

Contents: problem context, survey design, variables and research questions.

Problem context

Students’ mathematics achievement varies substantially across schools: in some schools most students score high, in others many still struggle to meet the competency standards.

The institution wants to know why. Is the variation mainly due to individual student characteristics (prior ability, socioeconomic status, study time), or also to the school environment (facility quality, teacher experience)?

Students in the same school share facilities, academic environment and teachers, so their scores tend to be similar and are not independent. Treating all students as independent would ignore school information.

Survey design

A survey randomly selected 30 schools, then 30 students from each (900 students). The data have a two-level hierarchy: students nested in schools.

LevelVariableDescription
1 · Studentmath_score (Y)Mathematics test score
1 · Studentprior_scoreMathematical ability before instruction
1 · StudentsesSocioeconomic conditions of the family
1 · Studentstudy_hoursAverage weekly hours studying mathematics
1 · StudentgenderMale / Female
2 · SchoolfacilityQuality of learning facilities
2 · Schoolteacher_expMathematics teachers’ years of experience

Research questions

  1. How much variation is attributable to differences between students, and how much to differences between schools?
  2. Can student characteristics explain differences in achievement?
  3. Can school characteristics explain differences across schools?
  4. After accounting for both, do between-school differences remain unexplained?

Why a multilevel model?

Intraclass correlation violates the independence assumption of OLS: standard errors of school-level variables become too small. Here ICC = 0.082 and the design effect = 1 + (30 − 1)·ICC = 3.38.

Method: linear mixed models with a random school intercept (REML for estimation, ML for LRT/AIC/BIC). See the Models tab for M1–M4.

Analysis workflow

  1. EDA and data checks
  2. Null model → ICC (Q1)
  3. M2 student predictors (Q2)
  4. M3 school predictors + robustness (Q3)
  5. Residual τ₀₀ test (Q4)
  6. M4 random slope, diagnostics, conclusions

Objective

To help the institution decide whether interventions should be directed primarily toward individual students, the school environment, or both. Use the tabs above: Overview for a quick picture, Models to understand each model, and the Q1–Q4 tabs for each question.

OverviewQuick picture

Contents: key indicators and core charts. Result: variation is mainly between students (92%), yet schools still matter (8%).

Students × schools90030 schools × 30 students
ICC (null model)0.0828.2% between schools
Design effect3.38OLS understates variance
σ² explained (M2)98.6%by student traits
τ₀₀ explained (M3)38.2%by students + schools
τ₀₀ remaining (M3)62%LRT p < 0.001
teacher_exp+0.70per SD · significant in 4/4 specs
Missing values0no imputation needed

1Variance

8.2% of score variation is between schools, 91.8% between students.

2Students

SES, prior ability, study hours and gender are significant. σ² falls 99%.

3Schools

teacher_exp is robust (4/4), facility inconsistent (1/4). τ₀₀ falls another 16%.

4Residual variance

Between-school differences remain (p < 0.001).

Map of 30 schools × 30 students

One column = one school, one dot = one student. Hover over a dot.

Variance composition (null model)

Schools account for 8.2% of total variance, the basis for a multilevel model.

Variance explained by each model (%)

Student predictors explain almost all of σ²; the remaining school variance is handled by level-2 variables.

Fixed effects of Model 3 by level (solid = significant)

Green = student level, yellow = school level; all effects per 1 SD.

Model comparison (AIC and BIC, ML)

M4 is much better than M3 (ΔAIC = 262).

ModelsWhat each model is

Contents: what each model (M1–M4) is, its equation, why it is fitted, and its results, plus supporting models. Result: M1 gives the ICC, M2–M3 add predictors, M4 adds a random slope.

Overview of the models

ModelTypeFormulaAnswersKey result
M1 NullRandom intercept (no predictors)math ~ 1 + (1 | school)Q1: how much variance is between schoolsICC = 0.082
M2 StudentRandom intercept + level-1 predictorsmath ~ prior + ses + study + gender + (1 | school)Q2: do student traits explain scoresσ² ↓ 98.6%
M3 FullRandom intercept + level-1 and level-2 predictorsM2 + facility + teacher_expQ3 and Q4: do school traits explain school differences; what remainsτ₀₀ ↓ 38.2%; residual τ₀₀ p < 0.001
M4 Final extensionM3 + random slope for study_hoursM3 + (1 + study_hours | school)Extra: does the study-hours effect vary by schoolslope SD 0.38; LRT p < 0.001

All models are linear mixed models fitted by REML; ML fits are used for likelihood-ratio tests, AIC and BIC. Predictors are z-scored (level-1 over 900 students, level-2 over 30 schools), so coefficients are effects per 1 SD.

Model 1: Null (unconditional) model

What it is. A model with only an intercept and a random school intercept. It has no predictors; every school gets its own average score u₀ⱼ around the grand mean γ₀₀.

Why we fit it. To split the total score variance into a between-school part (τ₀₀) and a within-school, between-student part (σ²). Their ratio is the ICC and shows whether a multilevel model is needed at all.

Yij = γ00 + u0j + eij
u0j ~ N(0, τ00), eij ~ N(0, σ²)

Result. γ₀₀ = 77.79, τ₀₀ = 3.165, σ² = 35.408, ICC = 0.082, design effect = 3.38. About 8.2% of variation is between schools.

ParameterCoef.SEzp95% CI
Intercept77.7870.381204.38<0.001***77.041 ; 78.533

ML fit: log-likelihood -2901.2 · AIC 5808.4 · BIC 5822.8 · 3 parameters

Model 2: Student-level predictors

What it is. Model 1 plus the four student characteristics as fixed effects (prior_score, ses, study_hours, gender). The intercept is still allowed to vary by school.

Why we fit it. To test whether individual traits explain score differences (Question 2). Comparing σ² with Model 1 shows how much within-school variance they explain.

Yij = γ00 + γ10·priorij + γ20·sesij + γ30·studyij + γ40·maleij + u0j + eij

Result. σ² falls 35.41 → 0.507 (98.6% explained); τ₀₀ falls 26.1%. All four predictors are significant; SES is the strongest.

ParameterCoef.SEzp95% CI
Intercept77.5880.281275.92<0.001***77.037 ; 78.139
prior_score (z)2.3450.02497.40<0.001***2.298 ; 2.392
ses (z)5.3820.024222.93<0.001***5.335 ; 5.430
study_hours (z)0.3330.02413.83<0.001***0.286 ; 0.380
gender: male0.4210.0488.72<0.001***0.327 ; 0.516

ML fit: log-likelihood -1042.9 · AIC 2099.7 · BIC 2133.3 · 7 parameters

Model 3: Student + school predictors (main model)

What it is. Model 2 plus the two school-level variables, facility and teacher_exp, which are identical for all students in a school.

Why we fit it. To test whether school characteristics explain differences across schools (Question 3) and to check how much school variance remains afterwards (Question 4, residual τ₀₀).

Yij = γ00 + γ10·priorij + γ20·sesij + γ30·studyij + γ40·maleij
   + γ01·facilityj + γ02·teacherj + u0j + eij

Result. τ₀₀ falls 2.340 → 1.957 (16.3% additional). teacher_exp is significant, facility is not. Residual τ₀₀ is still significant (p < 0.001).

ParameterCoef.SEzp95% CI
Intercept77.5880.258301.26<0.001***77.083 ; 78.093
prior_score (z)2.3450.02497.40<0.001***2.298 ; 2.392
ses (z)5.3820.024222.94<0.001***5.335 ; 5.430
study_hours (z)0.3320.02413.81<0.001***0.285 ; 0.380
gender: male0.4220.0488.73<0.001***0.327 ; 0.516
facility (z)0.4780.2741.740.081-0.059 ; 1.015
teacher_exp (z)0.7020.2742.560.010*0.166 ; 1.239

ML fit: log-likelihood -1039.1 · AIC 2096.3 · BIC 2139.5 · 9 parameters

Model 4: Random slope for study_hours

What it is. Model 3 where the effect of study hours is also allowed to differ between schools, via a random slope u₃ⱼ that is correlated with the random intercept.

Why we fit it. Model 3 fails the homoscedasticity check across schools. The random slope absorbs the extra school-specific spread and tests whether study hours work equally well everywhere.

Yij = γ00 + … + (γ30 + u3j)·studyij + u0j + eij
(u0j, u3j) ~ N(0, T), T = [τ00, τ03; τ03, τ33]

Result. LRT vs Model 3 = 265.8 (p < 0.001); slope SD = 0.38, ρ = 0.96; σ² falls to 0.365. Homoscedasticity is restored.

ParameterCoef.SEzp95% CI
Intercept77.5750.252308.27<0.001***77.081 ; 78.068
prior_score (z)2.3410.021113.67<0.001***2.301 ; 2.382
ses (z)5.3760.021259.66<0.001***5.335 ; 5.416
study_hours (z)0.3100.0734.24<0.001***0.167 ; 0.453
gender: male0.4670.04111.28<0.001***0.386 ; 0.548
facility (z)0.3850.1083.57<0.001***0.174 ; 0.595
teacher_exp (z)0.4570.1124.08<0.001***0.237 ; 0.676

ML fit: log-likelihood -906.3 · AIC 1834.5 · BIC 1887.3 · 11 parameters

Supporting models and checks

Model / checkPurposeResult
OLS (no random effect)Baseline that treats all students as independentSE of facility and teacher_exp are 5.1× and 5.1× too small
Cluster-robust OLSRobustness of school effects without random effectsteacher_exp p = 0.004; facility p = 0.094
Two-stage regressionRegress adjusted school means on school variablesteacher_exp p = 0.016; facility p = 0.092
Leave-one-school-out (30 refits of M3)Is a finding driven by a single school?teacher_exp significant in 29/30; facility in 2/30
Random-slope screening (ses, prior, study)Which effects vary by schoolOnly study_hours (LRT 265.8)
Contextual modelAdds school means of ses, prior, study (exploratory)τ₀₀ 1.957 → 1.787

Why multilevel? SE of OLS vs multilevel (M3)

OLS shrinks the standard errors of school-level variables, giving overconfident conclusions.

Data & EDAData exploration

Contents: data structure, quality, descriptives and spread. Result: no missing values; school scores clearly differ; ses correlates most with scores (r = 0.89).

Data structure: two levels

LevelUnitVariables
1Student (i)math_score (Y), prior_score, ses, study_hours, gender
2School (j)facility, teacher_exp (identical for all students in a school)

Students are nested in schools, so scores within a school are correlated. OLS ignores this and understates the standard errors of school-level variables. The impact is measured by the design effect = 1 + (m − 1)·ICC.

Data quality

CheckResult
Rows900
Missing values0
Duplicate rows0
Schools30
Students per school30
Distinct facility/teacher_exp values per school (must be 1)1

No missing values, so no imputation is needed. Level-1 predictors are z-scored over 900 students, level-2 predictors over 30 schools (coefficients = effect per 1 SD).

Descriptive statistics

VariableMeanSDMinMax
math_score77.796.2057.995.9
prior_score64.8310.0131.395.0
ses49.5812.2016.983.9
study_hours7.932.511.016.1
facility69.5410.1147.191.0
teacher_exp9.363.013.515.0
GendernMeanSD
Male42577.976.42
Female47577.626.00

Correlations, VIF and sums of squares

math_scoreprior_scoresesstudy_hoursfacilityteacher_exp
math_score1.000.380.890.060.030.10
prior_score0.381.000.01-0.02-0.03-0.00
ses0.890.011.000.02-0.000.02
study_hours0.06-0.020.021.000.020.03
facility0.03-0.03-0.000.021.00-0.30
teacher_exp0.10-0.000.020.03-0.301.00
VariableVIF
prior_score_z1.002
ses_z1.001
study_hours_z1.002
gender_male1.001
facility_z1.104
teacher_exp_z1.104

All VIF ≈ 1: no multicollinearity. facility–teacher_exp correlation (30 schools): -0.304. Sum of squares: between schools 10.9%, within schools 89.1%.

Distribution of math scores

Score spread per school (box = Q1–Q3, dot = median)

School medians differ clearly: a sign of a school variance component.

Scores by gender (box = Q1–Q3, dot = median)

Mean: male 78.0, female 77.6.

Sum-of-squares decomposition

ANOVA view: share of total variation lying between vs within schools.

School mean score vs facility

r = 0.10, p = 0.600

School mean score vs teacher_exp

r = 0.31, p = 0.095

School mean score vs school mean ses

r = 0.73, p < 0.001

Predictors vs math score (interactive)

Predictor:

math_score vs prior_score

math_score vs ses

math_score vs study_hours

math_score vs facility

VarianceBetween students vs schools

Contents: variance decomposition with the null model (M1). Result: ICC = 0.082, design effect = 3.38.

Question 1How much of the variation in students’ mathematics achievement is attributable to differences between students, and how much to differences between schools?
Key findingICC = 0.082. About 8.2% of score variation lies between schools and 91.8% between students within schools. School variance test: p < 0.001. Design effect = 3.38, so a multilevel model is required.

Variance decomposition (M1 Null)

Null model (random intercept)

ParameterCoef.SEzp95% CI
Intercept77.7870.381204.38<0.001***77.041 ; 78.533
ComponentValue
τ₀₀ (school variance)3.165
σ² (student variance)35.408
ICC0.0821
LRT vs OLS35.59 (p < 0.001)
Design effect (m = 30)3.38
SS between / within10.9% / 89.1%
InterpretationStudents in the same school share a learning environment, so their scores are similar (intraclass correlation 0.082). The LRT p-value is halved because τ₀₀ is tested on the boundary (zero). With a design effect of 3.38, OLS understates variances by roughly 3.4×.

Student traitsLevel-1 effects

Contents: Model 2 with student predictors. Result: σ² falls 99%; SES is strongest.

Question 2Can individual student characteristics, such as prior mathematics ability, socioeconomic status, and study time, explain differences in mathematics achievement?
Key findingYes. Per 1 SD: prior_score +2.35 (p < 0.001), ses +5.38 (p < 0.001), study_hours +0.33 (p < 0.001), male +0.42 (p < 0.001). σ² falls from 35.41 to 0.507 (98.6% of within-school variance explained).

Model 2: student predictors

ParameterCoef.SEzp95% CI
Intercept77.5880.281275.92<0.001***77.037 ; 78.139
prior_score (z)2.3450.02497.40<0.001***2.298 ; 2.392
ses (z)5.3820.024222.93<0.001***5.335 ; 5.430
study_hours (z)0.3330.02413.83<0.001***0.286 ; 0.380
gender: male0.4210.0488.72<0.001***0.327 ; 0.516

Student-level effects (solid = significant)

Gender: male minus female.

InterpretationSES is the strongest predictor, followed by prior ability. Study hours and gender are significant but small. The residual ICC in M2 rises (0.822) not because schools matter more, but because σ² drops sharply; Question 1 uses the ICC of the null model. Student predictors also reduce τ₀₀ (26.1%) because student composition differs between schools.

School traitsLevel-2 effects

Contents: Model 3, joint test and robustness of school effects. Result: teacher_exp is robust, facility is inconsistent.

Question 3Can school-level characteristics, such as the quality of school facilities and teacher experience, explain differences in mathematics achievement across schools?
Key findingPartly. teacher_exp +0.70 per SD (p = 0.010, significant); facility +0.48 (p = 0.081, not significant). Joint test M2 vs M3: χ² = 7.44, p = 0.024. τ₀₀ falls 2.340 → 1.957 (16.3% additional). Robustness: teacher_exp significant in 4/4 specifications, facility in 1/4.

Model 3: students + schools

ParameterCoef.SEzp95% CI
Intercept77.5880.258301.26<0.001***77.083 ; 78.093
prior_score (z)2.3450.02497.40<0.001***2.298 ; 2.392
ses (z)5.3820.024222.94<0.001***5.335 ; 5.430
study_hours (z)0.3320.02413.81<0.001***0.285 ; 0.380
gender: male0.4220.0488.73<0.001***0.327 ; 0.516
facility (z)0.4780.2741.740.081-0.059 ; 1.015
teacher_exp (z)0.7020.2742.560.010*0.166 ; 1.239

Fixed effects of M3 by level

Robustness: four specifications

SpecificationVariableCoef.SEpSig. 5%
M3: random interceptfacility (z)0.4780.2740.081No
M3: random interceptteacher_exp (z)0.7020.2740.010Yes
M4: + slope study_hoursfacility (z)0.3850.108<0.001Yes
M4: + slope study_hoursteacher_exp (z)0.4570.112<0.001Yes
OLS + school-clustered SEfacility (z)0.4770.2850.094No
OLS + school-clustered SEteacher_exp (z)0.7030.2450.004Yes
Two-stage (regression on 30 school means)facility (z)0.4780.2740.092No
Two-stage (regression on 30 school means)teacher_exp (z)0.7020.2740.016Yes

Coefficients by specification

Leave-one-school-out (30 scenarios): p-values

facility coef.facility pteacher_exp coef.teacher_exp p
min0.1500.0220.3820.0028
mean0.4740.1030.6990.0180
max0.5860.6210.7690.2059

teacher_exp stays at p<0.05 in 29/30 scenarios; facility in 2/30.

Leave-one-school-out: coefficients

The teacher_exp coefficient is stable; facility varies more depending on which school is dropped.

Interpretationteacher_exp: a robust finding. facility: positive direction, but the evidence is not consistent (depends on specification). With only 30 schools, power at level 2 is limited: "not significant" does not mean "no effect".

Residual varianceAnything left?

Contents: residual school variance test and school effects. Result: 62% of τ₀₀ remains and is significant.

Question 4After accounting for both student-level and school-level characteristics, do differences in mathematics achievement between schools remain unexplained?
Key findingYes. Residual τ₀₀ in M3 = 1.957 (SE 0.766); LRT vs OLS: χ² = 1205.2, p < 0.001. That is 61.8% of the initial τ₀₀ (≈ 5.1% of null total variance). Total τ₀₀ explained: 38.2%. In M4: τ₀₀ = 1.876, random-effects block test p < 0.001: same conclusion.

Caterpillar plot M3 (û₀ⱼ ± 1.96 conditional SE)

29 of 30 schools differ significantly from the average school (red). SD of school effects = 1.40. Conditional SE = 0.129 (approximation).

Variance decomposition across models

Formal tests

TestStatisticp
Q1: M1 vs OLS35.59<0.001
Q3: M2 vs M3 (2 df)7.440.024
Q4: M3 vs OLS1205.19<0.001
Q4 in M4: random-effects block1471.0<0.001
InterpretationDifferences between schools remain that the available variables do not explain, for example school culture, leadership, or parental support. A combined approach (students + schools) is therefore needed.

Study-hours slopeExtra finding (M4)

Contents: Model 4 with a random study-hours slope. Result: the study-hours effect differs between schools (SD 0.38).

Key findingThe effect of study hours differs between schools. LRT for a random study_hours slope = 265.8 (p < 0.001), ΔAIC = 261.8. Average slope +0.310 per SD, between-school SD 0.384, intercept–slope correlation ρ = 0.96.

Random-slope tests (ML)

Random slopeLRTp (df = 2)Slope variance
ses (z)0.030.9840.0010
prior_score (z)0.001.0000.0008
study_hours (z)265.79<0.0010.1415

Only study_hours is significant; the effects of ses and prior_score can be treated as equal across schools.

Model 4: M3 + random slope for study_hours

ParameterCoef.SEzp95% CI
Intercept77.5750.252308.27<0.001***77.081 ; 78.068
prior_score (z)2.3410.021113.67<0.001***2.301 ; 2.382
ses (z)5.3760.021259.66<0.001***5.335 ; 5.416
study_hours (z)0.3100.0734.24<0.001***0.167 ; 0.453
gender: male0.4670.04111.28<0.001***0.386 ; 0.548
facility (z)0.3850.1083.57<0.001***0.174 ; 0.595
teacher_exp (z)0.4570.1124.08<0.001***0.237 ; 0.676
ComponentValue
τ₀₀ (intercept)1.876
τ₁₁ (slope)0.147
ρ0.96
σ²0.365 (M3: 0.507)

Study-hours effect by school

BLUPs: intercept û₀ vs slope û₁

Model correlation ρ = 0.96: schools with higher baseline scores tend to gain more from study hours, hinting at unmeasured school factors.

Effect of ses by school (OLS, ± 1.96 SE)

Slopes are roughly parallel across schools, supporting a random intercept only for this variable.

Effect of prior_score by school (OLS, ± 1.96 SE)

Slopes are roughly parallel across schools, supporting a random intercept only for this variable.

Random-slope LRT

Only study_hours exceeds the critical value.

Exploratory contextual model (school means)

ParameterCoef.SEzp95% CI
Intercept77.5880.246315.06<0.001***77.105 ; 78.070
prior_score (z)2.3450.02497.41<0.001***2.298 ; 2.393
ses (z)5.3820.024222.88<0.001***5.334 ; 5.429
study_hours (z)0.3330.02413.83<0.001***0.286 ; 0.380
gender: male0.4220.0488.73<0.001***0.327 ; 0.516
facility (z)0.4890.2711.810.071-0.042 ; 1.020
teacher_exp (z)0.7110.2712.620.009**0.180 ; 1.242
school-mean ses2.6631.3781.930.053-0.038 ; 5.363
school-mean prior-0.9361.547-0.600.545-3.967 ; 2.096
school-mean study-1.9201.589-1.210.227-5.035 ; 1.195

M3 τ₀₀ = 1.957 → contextual model 1.787. Only 30 schools: treat as a lead for future research, not a main finding.

Contextual effects, coefficient ± 1.96 SE

Solid = significant. Exploratory (30 schools).

InterpretationThe average slope in the ordinary model (M3) hides this heterogeneity: in some schools study hours help a lot, in others the effect is near zero or negative. A "more study hours" programme should be tailored per school.

DiagnosticsAssumption checks

Contents: model assumption checks. Result: normality and linearity hold; homoscedasticity holds only in M4.

Assumption checks

AssumptionTestResultStatus
Normality of residuals (M3)Shapiro-WilkW=0.998, p = 0.454; skew 0.01, kurt 0.01✓
Normality of random effectsShapiro-WilkW=0.949, p = 0.157✓ (indicative, n = 30)
LinearityResidual vs ses, priorNo curvature✓
MulticollinearityMax VIF1.10✓
Homoscedasticity M3Levene across schoolsp < 0.001✗
Homoscedasticity M4 (slope)Levene across schoolsp = 0.348✓
IndependenceSurvey design30 randomly sampled schools✓

M3 fails homoscedasticity, consistent with a study-hours effect that differs between schools; M4 fixes it.

Q-Q plot of level-1 residuals

Residuals vs fitted

Residual histogram

Q-Q plot of school random effects

Residuals vs ses (linearity)

Residuals vs prior (linearity)

Residual SD per school: M3 vs M4 (homoscedasticity)

In M3 the residual spread varies strongly between schools; in M4 it is much more uniform.

ConclusionsTable and recommendations

Contents: M1–M4 comparison table, conclusions, recommendations and limitations.

Model summary table

M1 NullM2 StudentM3 FullM4 + study slope
Intercept77.787*** (0.381)77.588*** (0.281)77.588*** (0.258)77.575*** (0.252)
prior_score (z)2.345*** (0.024)2.345*** (0.024)2.341*** (0.021)
ses (z)5.382*** (0.024)5.382*** (0.024)5.376*** (0.021)
study_hours (z)0.333*** (0.024)0.332*** (0.024)0.310*** (0.073)
gender: male0.421*** (0.048)0.422*** (0.048)0.467*** (0.041)
facility (z)0.478 (0.274)0.385*** (0.108)
teacher_exp (z)0.702* (0.274)0.457*** (0.112)
τ₀₀ (intercept variance)3.1652.3401.9571.876
τ₁₁ (study slope variance)0.147
ρ intercept–slope0.96
σ² (student variance)35.4080.5070.5070.365
ICC (null)0.082
PVE σ² (%)98.698.699.0
PVE τ₀₀ (%)26.138.240.7
R² marginal / conditional0.000 / 0.0820.924 / 0.9870.935 / 0.987–
AIC (ML)5808.42099.72096.31834.5
BIC (ML)5822.82133.32139.51887.3

Coefficient (SE); * p<.05, ** p<.01, *** p<.001. N = 900 students, 30 schools.

Predicted vs observed (M3)

Observed–predicted correlation = 0.994

Conclusions by question

  1. Q1. ICC = 8.2%: variation is mostly between students (91.8%), but schools remain real (p < 0.001).
  2. Q2. Student characteristics explain 98.6% of within-school variance; SES is strongest, then prior ability.
  3. Q3. teacher_exp is robust (4/4 specifications); facility is positive but inconsistent (1/4). τ₀₀ falls another 16.3%.
  4. Q4. Between-school differences remain (62% of the initial τ₀₀; p < 0.001).

R² marginal and conditional (Nakagawa)

Fixed effects explain nearly all variation in scores.

Intervention recommendations

  • Student level (priority): SES and prior ability, e.g. remedial tutoring and socioeconomic support.
  • School level: improve teacher quality/experience (robust); facilities are positive but not consistent.
  • Study hours: the effect depends on the school context; tailor programmes per school.
  • Combined approach: between-school variance remains; investigate other school factors.

Limitations

  • Observational data: associations, not causation.
  • Only 30 schools: limited power at level 2, and effects are sensitive to particular schools (see leave-one-school-out).
  • Normality and linearity hold; homoscedasticity across schools holds only after adding the random study_hours slope (M4).
  • M4 inference relies on the intercept–slope correlation (ρ = 0.96) estimated from 30 schools.

SimulatorInteractive prediction

Contents: predicted score for a profile you choose (fixed effects of M3).

Student and school profile

Predicted score (fixed effects of M3)

Bars = contribution of each variable relative to an average student in an average school. The school random effect is set to 0.