Balanced panel data from the National Longitudinal Survey of Youth (NLSY), 1980–1987. Contains 4,360 observations on 545 young men observed over 8 years (the panel is balanced: every man contributes exactly one observation per year). Useful for demonstrating panel methods, including two-way clustering by individual and year.
Format
A data frame with 4,360 observations and 11 variables:
- nr
Person identifier.
- year
Calendar year (1980–1987).
- lwage
Log hourly wage.
- educ
Years of education.
- black
Black (binary).
- hisp
Hispanic (binary).
- exper
Years of labor market experience.
- expersq
Experience squared (
exper^2).- married
Married (binary).
- union
Union member (binary).
- hours
Annual hours worked.
Source
Vella, F. and Verbeek, M. (1998). "Whose Wages Do Unions Raise? A Dynamic Model of Unionism and Wage Rate Determination for Young Men." Journal of Applied Econometrics, 13(2), 163–183.
Wooldridge, J.M. (2010). Econometric Analysis of Cross Section and Panel Data, 2nd ed. MIT Press.
Obtained from Stata's bcuse archive (Boston College),
bcuse wagepan.
Redistribution basis: system.file("COPYRIGHTS", package = "ivreg2r").
Details
The bundled data are in raw levels, not within-transformed. Fixed-effects
use (e.g. the Stock-Watson panel-robust VCE, sw = TRUE) requires
demeaning each variable by panel unit before fitting; see the worked
example in the "Fixed-effects panels: the Stock-Watson correction"
section of vignette("time-series-gmm").
Examples
data(wagepan)
# OLS with two-way clustering by person and year
# The canonical two-way clustering example from the ivreg2 help file lives
# in ?nlswork; this block illustrates the same VCE on a different panel.
fit <- ivreg2(lwage ~ educ + black + hisp + exper + expersq + married + union,
data = wagepan, clusters = ~ nr + year, small = TRUE)
summary(fit)
#>
#> OLS Estimation
#>
#> Call:
#> ivreg2(formula = lwage ~ educ + black + hisp + exper + expersq +
#> married + union, data = wagepan, clusters = ~nr + year, small = TRUE)
#>
#> Observations: 4,360
#> VCV type: Cluster-robust, small-sample corrected
#> Clusters: 545 (nr), 8 (year)
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) -0.0347056 0.1179535 -0.294 0.777115
#> educ 0.0993878 0.0086400 11.503 8.44e-06 ***
#> black -0.1438417 0.0511370 -2.813 0.026038 *
#> hisp 0.0156980 0.0378971 0.414 0.691106
#> exper 0.0891791 0.0150777 5.915 0.000591 ***
#> expersq -0.0028487 0.0009645 -2.953 0.021301 *
#> married 0.1076656 0.0234920 4.583 0.002535 **
#> union 0.1800725 0.0288443 6.243 0.000427 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> ---
#> R-squared: 0.1866
#> Adj. R-squared: 0.1853
#> F(7, 7): 52.6 (p = 0.0000)
#> Root MSE: 0.4807
#>