# load data
load(url("https://biostatistics.dk/teaching/eurocim/data/nlsdata.rda"))

The National Longitudinal Survey of Youth 1997 (NLSY97) is a longitudinal study following youth born between 1980 and 1984 with interviews from 1997 to 2022 and a total of 20 rounds (R1 - R20). We consider a subset of the data with measurements in 1997, 2002 and 2008 (R1, R6 and R12), and the variables described in the table below. We consider a total of 6315 complete cases. For details see https://www.nlsinfo.org/content/cohorts/nlsy97.

Variable name Tier Type Description
r1_hhchildren R1 Numeric Number of household members younger than 18
r1_urban R1 Binary Urban status (Urban / Non-urban)
r1_mcollege R1 Binary Did biological mother attend college? (Yes / No)
r6_exercise R6 Numeric Days with 30+ minutes exercise /week
r6_depressed R6 Binary Having felt depressed during the last month (Sometimes / No)
r6_docvisits R6 Numeric Number of doctor’s visits during the last year
r12_health R12 Binary Perception of own health (Good / Poor)
r12_depressed R12 Binary Having felt depressed during the last month (Sometimes / No)
r12_docvisits R12 Numeric Number of doctor’s visits during the last year


Large dataset

# load data
load(url("https://biostatistics.dk/teaching/eurocim/data/nlsdata2.rda"))

This dataset is also a subset of the NLSY97 data with measurements in 1997, 2002 and 2008 (R1, R6 and R12), but consists of 23 variables described in the table below. This dataset contains of 8984 observations, but now with missing values.

Variable name Tier Type Description
r1_age R1 Numeric Age at inclusion
r1_sex R1 Binary Sex (Male / Female)
r1_hhsize R1 Numeric Number of household members
r1_hhchildren R1 Numeric Number of household members younger than 18
r1_parents R1 Binary Does the non-responding biological parent live in the household? (Yes / No)
r1_urban R1 Binary Urban status (Urban / Non-urban)
r1_race R1 Binary Race/ethnicity (Black/hispanic/mixed race / Non-black/non-hispanic)
r1_mcollege R1 Binary Did biological mother attend college? (Yes / No)
r1_mage R1 Numeric Age of biological mother at first birth
r1_veg R1 Numeric Days eating vegetables /week
r1_exercise R1 Numeric Days with 30+ minutes exercise /week
r1_health R1 Binary Perception of own health (Good / Poor)
r1_depressed R1 Binary Having felt depressed during the last month (Sometimes / No)
r6_veg R6 Numeric Meals inclduing vegetables /week
r6_exercise R6 Numeric Days with 30+ minutes exercise /week
r6_health R6 Binary Perception of own health (Good / Poor)
r6_depressed R6 Binary Having felt depressed during the last month (Sometimes / No)
r6_docvisits R6 Numeric Number of doctor’s visits during the last year
r12_veg R12 Numeric Meals including vegetables /week
r12_exercise R12 Numeric Days with 30+ minutes exercise /week
r12_health R12 Binary Perception of own health (Good / Poor)
r12_depressed R12 Binary Having felt depressed during the last month (Sometimes / No)
r12_docvisits R12 Numeric Number of doctor’s visits during the last year