Learn R Programming

NlsyLinks (version 0.19)

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? ** 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