Below you will find syntax files provided by other researchers who have used Understanding Society data. Please note that these syntax files have not been checked for accuracy and you should contact the author of the file if you have any queries. If you have syntax that you would like to share here please contact the user support team.
Merging indresp and hhresp files within each wave, and then merging these files across all waves into a long format file using R
“This R code merges the household file with the individual file for all waves; it then merges these wave-specific merged files into a wide-format dataframe, sets up the variable names so that they will work with reshape, and then completes the reshape from wide to long. This code was authored and provided to us by Dr. David Bartram, University of Leicester. If you have any questions about this code please email Dr. Bartram at d.bartram@leicester.ac.uk.”
Working-Life Histories in Understanding Society and BHPS
This project contains files for creating work-life histories for participants in the BHPS and UKHLS. To create the histories, download the Stata .do files from the GitHub repository and follow the instruction in the report. You can find all the project information on this webpage. For any questions about the code or the project please contact Liam Wright.
Long-term depresssion following stressful life events: feeling ‘worthless’ shows the slowest recovery.
Research paper: John Simister (2019) ‘Long-term depression following stressful life events: feeling ‘worthless’ shows the slowest recovery’, Archives of Psychology 3(6):1-20. https://doi.org/10.31296/aop.v3i6
The syntax files which were used to create the variables used in this analysis are Simister_syntaxfile_1 and Simister_syntaxfile_2, to be run in that order. The syntax file, Simister_syntaxfile_1.sps, combines the INDRESP and HHRESP files across 18 waves of BHPS and 8 waves of UKHLS to create one long format individual level file and creates a number of variables: clinicaldepression, earn_net, earn_gross, sp_cCare, LIVEcnty, numAdult, region. The resulting data file is saved as “BHPS and UndS subset.sav”. The syntax file, Simister_syntaxfile2.sps, uses “BHPS and UndS subset.sav” to create additional variables which were used in the analysis in the accompanying paper. Disclaimer: The syntax has not be quality checked by Understanding Society team and are the responsibility of the author. For any questions about this please contact Dr John Simister.
Comparative Panel File
The Comparative Panel File (CPF) harmonises the world’s largest and longest-running household panel surveys from seven countries: Australia (HILDA), Germany (SOEP), UK (BHPS and UKHLS), Korea (KLIPS), Russia (RLMS), Switzerland(SHP), and the United States (PSID). The CPF is an open-source code that integrates individual and household panel data from all seven surveys into a harmonised three-level data structure: repeated observations from multiple waves are clustered within individuals, and individuals are clustered within countries. You can download the code from the CPF website. For any questions about the CPF contact the CPF team.
Unpaid carers during the pandemic
The impact of unpaid caring is closely related to the intensity of the care provision. Evidence suggests that unpaid carers were affected negatively by the COVID-19 pandemic, but previous studies have not made a distinction between different caring types. This analysis explores who the unpaid carers are during the second wave of the pandemic, their state of health and how they have been able to manage their own health through accessing healthcare services. It will make a distinction between different caring types. You can download the code from GitHub. For more information on this research you can read the Health Foundation post on the blog.
Stata syntax to create some variables related to work hour loss using UKHLS Covid-19 survey data
Description: This stata syntax file uses data from the Covid Survey Waves 1-3 to produce variables to measure (i) experience of loss of work hours (ii) Reasons for experiencing loss of work hours. This syntax was produced by Dr. Shih-Yi Chao, Research Fellow, CPC, University of Southampton. If you have any questions about the syntax please contact Dr. Chao.
Tools for working with the Understanding Society data
Description: Tools for compiling multiple waves of Understanding Society into one tidy data frame. https://github.com/wklimowicz/tidyusoc (R) If you have any questions about the R syntax, please submit an issue.
Combining individual- and population-level data to develop a Bayesian parity-specific fertility projection model
Description: These are the R syntax/script files that were used to produce the analysis in the peer-reviewed Open Access journal article Combining individual and population level data to develop a Bayesian parity-specific fertility projection model.
[Joanne Ellison, Ann Berrington, Erengul Dodd and Jonathan J. Foster (2023), Combining individual- and population-level data to develop a Bayesian parity-specific fertility projection model. Journal of the Royal Statistical Society Series C: Applied Statistics, qlad095. https://doi.org/10.1093/jrsssc/qlad095]
If you have any questions about the R syntax/script files, please contact Joanne Ellison.