Centre for Longitudinal Studies
- This repository provides R scripts that harmonise the multiple sweeps of Millennium Cohort Study into a single tidy dataset, so analysts can get straight to research rather than recoding.
| Domain | Examples |
|---|---|
| Demographics | sex, ethnicity, language |
| Socio-economic | parental education, household income |
| Education | qualifications, institution type |
| Health | self-rated health, limiting illness |
| Relationships | partnership status, sexual orientation |
See mcs_core_sweeps 1_7_user_guide.docx for full details.
- Download the following folders as .dta files from the UK Data Service (UKDS): SN 4683, SN 5350, SN 5795, SN 6411, SN 7464, SN 8156, SN 8682, SN 8172, SN 8550.
- Open the file "1_MCS_Core.R" within the Codes subfolder.
- Define the path for core_dir to the folder that this file is contained in.
- Define the subpaths for each of the 9 folders downloaded from UKDS.
- Run or source the entire 1_MCS_Core.R.
- Your completed MCS Core file can be found in the temp_data folder.
- Download the following folders as .dta files from the UK Data Service (UKDS): SN 4683, SN 5350, SN 5795, SN 6411, SN 7464, SN 8156, SN 8682, SN 8172, SN 8550.
- Open the file 1_MCS_Core.do within the Codes subfolder.
- Define the path for core_dir to the folder this file is contained in.
- Define the subpaths for each of the 9 folders downloaded from UKDS.
- Run the entire 1_MCS_Core.do.
- Your completed MCS Core file can be found in the temp_data folder.
We welcome user feedback. Please open an issue on GitHub or email [email protected].
- Nicolas Libuy
- Dominic Kelly
- Emla Fitzsimons
- Megan Arnot
- Gergo Baranyi
- Uta Bolt
- Ollie Cassaganeau-Francis
- Marta Francesconi
- Tom Metherell
- Larissa Pople
- Georgia Turner
Code: MIT Licence (see LICENSE).
© 2025 UCL Centre for Longitudinal Studies