Description Format Source Examples
The data was collected to track the labor experiences of male high-school dropouts. The men were between 14 and 17 years old at the time of the first survey.
Number of subjects: 888; Number of variables: 15; Number of observations, across all subjects: 6402
idid numbers for each subject
lnwnatural log of wages, adjusted for inflation, to 1990 dollars
experlength of time in the workforce (in years). This is treated as the time variable, with t = 0 for each subject starting on their first day at work. The number of time points and values of time points for each subject can differ
gedwhen/if a graduate equivalency diploma is obtained
blackcategorical indicator of race is black
hispaniccategorical indicator of race is hispanic
hgchighest grade completed
uerateunemployment rates in the local geographic region at each measurement time
Singer, J. D. & Willett, J. B. (2003), Applied Longitudinal Data Analysis, Oxford University Press, Oxford, UK. It is a subset of data collected in the National Longitudinal Survey of Youth (NLSY) described at http://www.bls.gov/nls/nlsdata.htm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(cranvas)
## Not run:
data(wages)
qwages <- qdata(wages)
qtime(exper, lnw, qwages, group = id) # Too slow right now
## this is a very simple linear regression assuming each man has the same slope,
## which may not be entirely reasonable
fit <- lm(lnw ~ exper + id, data = wages)
wage2 <- subset(wages, !duplicated(wages$id), c(id, hispanic))
## predict wages at year 0 and 6 respectively
wage2$lnw0 <- predict(fit, data.frame(id = unique(wages$id), exper = 0))
wage2$lnw6 <- predict(fit, data.frame(id = unique(wages$id), exper = 6))
qwage2 <- qdata(wage2, color = hispanic)
qhist(lnw0, data = qwage2, main = "Wages on the first day")
qhist(lnw6, data = qwage2, main = "Wages after 6 years")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.