This repository contains the code, data, and report for the multilevel project. The project investigates two datasets: the Programme for International Student Assessment (PISA) and the UK Household Longitudinal Study (UKHLS), focusing on reading performance of students and physical functioning of older adults, respectively.
The PISA dataset investigates factors associated with reading performance for 15-year-old students in the UK. It has a two-level hierarchical structure with students nested within schools. The dataset includes 7610 students across 334 schools. The analysis aims to address three key research questions:
- How much do schools vary in their average reading performance?
- Which student and school characteristics predict reading scores?
- Do the effects of student-level variables differ between schools?
The response variable is the reading score. Key student-level predictors include gender, immigration status, parental education, family wealth, cultural possessions, and learning minutes. School-level predictors include student-teacher ratio, school size, and school ownership type.
We used multilevel models to account for the hierarchical structure of the data. The model selection process involved:
- Adding student-level predictors.
- Testing for interactions among student-level predictors.
- Adding school-level predictors.
- Testing for random slopes and cross-level interactions.
The final model includes both student and school-level predictors, their interactions, and random slopes for gender and learning minutes. Key findings include:
- Females score higher on average than males.
- Parental education, family wealth, and cultural possessions positively affect reading scores.
- School type and size significantly impact reading performance.
The analysis is limited by potential biases in self-reported data, the assumptions of linearity and normality, and the binary classification of gender. The model also does not account for all possible confounding variables.
The study highlights the complex interplay of student and school-level factors in determining reading performance. It underscores the importance of considering both individual characteristics and school environment in educational assessments.
The UKHLS dataset investigates physical functioning in older adults using the SF-12 questionnaire. The dataset includes 28,468 observations from 5,602 individuals. The analysis aims to address three key research questions:
- What is the nature of change in physical functioning with age?
- To what extent do individuals vary in their physical functioning trajectories?
- What are the predictors of physical functioning?
The dataset has a two-level structure with repeated measures over multiple waves. Key variables include age, gender, ethnicity, educational qualifications, co-resident partner status, housing tenure, and log income.
The model selection process involved:
- Adding fixed and random effects for age.
- Testing for nonlinearity in age effects.
- Adding time-invariant and time-varying covariates.
- Comparing models using likelihood ratio tests and information criteria.
The final model includes both fixed and random effects for age, gender, ethnicity, educational qualifications, housing tenure, and log income. Key findings include:
- Physical functioning declines with age, with an accelerating rate of decline.
- Females and individuals of Asian and Black ethnicity report worse physical functioning.
- Higher educational attainment and homeownership are associated with better physical functioning.
The analysis assumes missing data are missing at random and does not account for all potential predictors of physical functioning. The use of self-reported measures may introduce biases.
The study reveals significant individual variation in physical functioning trajectories and highlights the impact of socioeconomic factors on health in older adults.
To run the project, run the R script.