Determinants of Wages Data (CPS 1985)
CPS1985.RdCross-section data originating from the May 1985 Current Population Survey by the US Census Bureau (random sample drawn for Berndt 1991).
Usage
data("CPS1985")Format
A data frame containing 534 observations on 11 variables.
- wage
Wage (in dollars per hour).
- education
Number of years of education.
- experience
Number of years of potential work experience (
age - education - 6).- age
Age in years.
- ethnicity
Factor with levels
"cauc","hispanic","other".- region
Factor. Does the individual live in the South?
- gender
Factor indicating gender.
- occupation
Factor with levels
"worker"(tradesperson or assembly line worker),"technical"(technical or professional worker),"services"(service worker),"office"(office and clerical worker),"sales"(sales worker),"management"(management and administration).- sector
Factor with levels
"manufacturing"(manufacturing or mining),"construction","other".- union
Factor. Does the individual work on a union job?
- married
Factor. Is the individual married?
Examples
data("CPS1985")
## Berndt (1991)
## Exercise 2, p. 196
cps_2b <- lm(log(wage) ~ union + education, data = CPS1985)
cps_2c <- lm(log(wage) ~ -1 + union + education, data = CPS1985)
## Exercise 3, p. 198/199
cps_3a <- lm(log(wage) ~ education + experience + I(experience^2),
data = CPS1985)
cps_3b <- lm(log(wage) ~ gender + education + experience + I(experience^2),
data = CPS1985)
cps_3c <- lm(log(wage) ~ gender + married + education + experience + I(experience^2),
data = CPS1985)
cps_3e <- lm(log(wage) ~ gender*married + education + experience + I(experience^2),
data = CPS1985)
## Exercise 4, p. 199/200
cps_4a <- lm(log(wage) ~ gender + union + ethnicity + education + experience + I(experience^2),
data = CPS1985)
cps_4c <- lm(log(wage) ~ gender + union + ethnicity + education * experience + I(experience^2),
data = CPS1985)
## Exercise 6, p. 203
cps_6a <- lm(log(wage) ~ gender + union + ethnicity + education + experience + I(experience^2),
data = CPS1985)
cps_6a_noeth <- lm(log(wage) ~ gender + union + education + experience + I(experience^2),
data = CPS1985)
anova(cps_6a_noeth, cps_6a)
#> Analysis of Variance Table
#>
#> Model 1: log(wage) ~ gender + union + education + experience + I(experience^2)
#> Model 2: log(wage) ~ gender + union + ethnicity + education + experience +
#> I(experience^2)
#> Res.Df RSS Df Sum of Sq F Pr(>F)
#> 1 528 101.31
#> 2 526 100.31 2 0.9987 2.6184 0.07387 .
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
## Exercise 8, p. 208
cps_8a <- lm(log(wage) ~ gender + union + ethnicity + education + experience + I(experience^2),
data = CPS1985)
summary(cps_8a)
#>
#> Call:
#> lm(formula = log(wage) ~ gender + union + ethnicity + education +
#> experience + I(experience^2), data = CPS1985)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -2.21420 -0.28259 0.00397 0.28081 2.12519
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.6247063 0.1203672 5.190 3.01e-07 ***
#> genderfemale -0.2317710 0.0386157 -6.002 3.63e-09 ***
#> unionyes 0.2116320 0.0504906 4.192 3.25e-05 ***
#> ethnicityhispanic -0.0807197 0.0877963 -0.919 0.3583
#> ethnicityother -0.1252561 0.0576543 -2.173 0.0303 *
#> education 0.0888161 0.0079604 11.157 < 2e-16 ***
#> experience 0.0344697 0.0053783 6.409 3.26e-10 ***
#> I(experience^2) -0.0005270 0.0001181 -4.464 9.87e-06 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 0.4367 on 526 degrees of freedom
#> Multiple R-squared: 0.3243, Adjusted R-squared: 0.3153
#> F-statistic: 36.06 on 7 and 526 DF, p-value: < 2.2e-16
#>
coeftest(cps_8a, vcov = vcovHC(cps_8a, type = "HC0"))
#>
#> t test of coefficients:
#>
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.62470629 0.12253881 5.0980 4.796e-07 ***
#> genderfemale -0.23177098 0.03889260 -5.9593 4.645e-09 ***
#> unionyes 0.21163199 0.04546102 4.6552 4.102e-06 ***
#> ethnicityhispanic -0.08071968 0.08554535 -0.9436 0.34581
#> ethnicityother -0.12525608 0.05319489 -2.3547 0.01891 *
#> education 0.08881608 0.00821642 10.8096 < 2.2e-16 ***
#> experience 0.03446974 0.00597216 5.7717 1.342e-08 ***
#> I(experience^2) -0.00052704 0.00012955 -4.0682 5.464e-05 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>