wages | R Documentation |
This data contains measurements on hourly wages by years in
the workforce, with education and race as covariates. The population
measured was male high-school dropouts, aged between 14 and 17 years
when first measured. wages
is a time series tsibble
.
It comes from J. D. Singer and J. B. Willett.
Applied Longitudinal Data Analysis.
Oxford University Press, Oxford, UK, 2003.
https://stats.idre.ucla.edu/stat/r/examples/alda/data/wages_pp.txt
wages
A tsibble
data frame with 6402 rows and 8 variables:
1–888, for each subject. This forms the key
of the data
natural log of wages, adjusted for inflation, to 1990 dollars.
Experience - the length of time in the workforce (in years).
This is treated as the time variable, with t0 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. This forms the index
of the data
when/if a graduate equivalency diploma is obtained.
change in experience since getting a ged (if they get one)
categorical indicator of race = black.
categorical indicator of race = hispanic.
highest grade completed
unemployment rates in the local geographic region at each measurement time
# show the data
wages
library(ggplot2)
# set seed so that the plots stay the same
set.seed(2019-7-15-1300)
# explore a sample of five individuals
wages %>%
sample_n_keys(size = 5) %>%
ggplot(aes(x = xp,
y = ln_wages,
group = id)) +
geom_line()
# Explore many samples with `facet_sample()`
ggplot(wages,
aes(x = xp,
y = ln_wages,
group = id)) +
geom_line() +
facet_sample()
# explore the five number summary of ln_wages with `features`
wages %>%
features(ln_wages, feat_five_num)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.