You can ask me for help, but I will be vague in my answers to avoid giving away the answers.
Please type your answers in a Word document. I will provide a place in Blackboard to upload your answers.
load("../380/Wooldridge Material/Data Sets- R/wage1.RData")
wage1 <- data
fit1 <- lm(lwage ~ educ, wage1)
summary(fit1)
##
## Call:
## lm(formula = lwage ~ educ, data = wage1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.21158 -0.36393 -0.07263 0.29712 1.52339
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.583773 0.097336 5.998 3.74e-09 ***
## educ 0.082744 0.007567 10.935 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4801 on 524 degrees of freedom
## Multiple R-squared: 0.1858, Adjusted R-squared: 0.1843
## F-statistic: 119.6 on 1 and 524 DF, p-value: < 2.2e-16
df <- Galton # from the HistData package
fit2 <- lm(child ~ parent,df)
summary(fit2)
##
## Call:
## lm(formula = child ~ parent, data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.8050 -1.3661 0.0487 1.6339 5.9264
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.94153 2.81088 8.517 <2e-16 ***
## parent 0.64629 0.04114 15.711 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.239 on 926 degrees of freedom
## Multiple R-squared: 0.2105, Adjusted R-squared: 0.2096
## F-statistic: 246.8 on 1 and 926 DF, p-value: < 2.2e-16
fit3 <- lm(lwage ~ female * scale(educ,scale=F), wage1)
summary(fit3)
##
## Call:
## lm(formula = lwage ~ female * scale(educ, scale = F), data = wage1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.02673 -0.27468 -0.03721 0.26221 1.34740
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.796e+00 2.702e-02 66.486 <2e-16 ***
## female -3.609e-01 3.907e-02 -9.236 <2e-16 ***
## scale(educ, scale = F) 7.723e-02 8.988e-03 8.593 <2e-16 ***
## female:scale(educ, scale = F) -6.408e-05 1.450e-02 -0.004 0.996
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4459 on 522 degrees of freedom
## Multiple R-squared: 0.3002, Adjusted R-squared: 0.2962
## F-statistic: 74.65 on 3 and 522 DF, p-value: < 2.2e-16
data1 <- read.csv('http://global.oup.com/uk/orc/busecon/economics/dougherty4e/01student/datasets/csv/eaef/eaef10.csv')
fit4 <- lm(EARNINGS ~ FEMALE*SINGLE + FEMALE*DIVORCED + FEMALE*MARRIED - 1,data1)
summary(fit4)
##
## Call:
## lm(formula = EARNINGS ~ FEMALE * SINGLE + FEMALE * DIVORCED +
## FEMALE * MARRIED - 1, data = data1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.443 -7.651 -2.737 3.596 83.857
##
## Coefficients: (1 not defined because of singularities)
## Estimate Std. Error t value Pr(>|t|)
## FEMALE -10.8074 1.3385 -8.074 4.54e-15 ***
## SINGLE 19.3230 1.8691 10.338 < 2e-16 ***
## DIVORCED 16.8120 1.8110 9.283 < 2e-16 ***
## MARRIED 26.7126 0.9583 27.876 < 2e-16 ***
## FEMALE:SINGLE 6.4785 3.5482 1.826 0.068433 .
## FEMALE:DIVORCED 9.1449 2.7536 3.321 0.000958 ***
## FEMALE:MARRIED NA NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.68 on 534 degrees of freedom
## Multiple R-squared: 0.7213, Adjusted R-squared: 0.7182
## F-statistic: 230.3 on 6 and 534 DF, p-value: < 2.2e-16