Learn R Programming

NlsyLinks (version 1.003)

ExtraOutcomes79: Extra outcome variables in the NLSY79

Description

This dataset is provided primarily to facilitate documentation examples. Currently this dataset contains only Gen2 subjects. However, it soon will include Gen1 subjects. Code written using this dataset should NOT assume it contains only Gen2 subjects. See below for an example of filtering by generation.

Usage

data(ExtraOutcomes79)

Arguments

source

Gen1 information comes from the May 15, 2010 release of the http://www.bls.gov/nls/nlsy79.htm{NLSY79 sample}. Gen2 information comes from the Sept 15, 2010 release of the http://www.bls.gov/nls/nlsy79ch.htm{NLSY79 Children and Young Adults sample}. Data were extracted with the NLS Investigator (https://www.nlsinfo.org/investigator/). **Kelly, is this correct? ** The SubjectTag variable uniquely identify subjects. For Gen2 subjects, the SubjectTag is identical to their CID (ie, C00001.00 -the SubjectID assigned in the NLSY79-Children files). However for Gen1 subjects, the SubjectTag is their CaseID (ie, R00001.00), with "00" appended. This manipulation is necessary to identify subjects uniquely in inter-generational datasets. A Gen1 subject with an ID of 43 has a SubjectTag of 4300. The SubjectTags of her four children remain 4301, 4302, 4303, and 4304. For Gen2, an NLSY79 variable of MathStandardized is C00000.00? **Kelly, can you give me an RNum for this? ** For Gen2, an NLSY79 variable of Weight is C00000.00? **Kelly, can you give me an RNum for this too? ** Data were simplied (to one value per subject) by Kelly Meredith in January 2012.

Examples

Run this code
library(NlsyLinks) #Load the package into the current R session.
data(ExtraOutcomes79)  #Load the dataset from the NlsyLinks package.
gen2Outcomes <- subset(ExtraOutcomes79, Generation==2) #Create a dataset of only Gen2 subjects.
                  
plot(ExtraOutcomes79)
summary(ExtraOutcomes79)

oldPar <- par(mfrow=c(3,2))
hist(ExtraOutcomes79$Generation)
hist(ExtraOutcomes79$MathStandardized)
hist(ExtraOutcomes79$Weight)
hist(ExtraOutcomes79$WeightForAge19To25)
hist(ExtraOutcomes79$WeightStandardized)
hist(ExtraOutcomes79$WeightStandardizedForAge19To25)
par(oldPar)

Run the code above in your browser using DataLab