# Example 8.8, Labor Force Participation of Married Women
# Data set: mroz
# Function for result reporting
source("_report.R")
# Load the data and estimate the model in the background
load("mroz.Rdata")
model=lm(inlf~nwifeinc+educ+exper+expersq+age+kidslt6+kidsge6,data=data)
dig=c(3,4,3,3,5,3,3,4,3)
# Describe the model
cat("Model to estimate: inlf = beta0 + beta1 * nwifeinc + beta2 * educ + beta3 * exper + beta4 * expersq + beta5 * age + beta6 * kidslt6 + beta7 * kidsge6 + u",
"\nwhere inlf is ", paste(desc[desc[,1]=="inlf",2]),
"\nnwifeinc is ", paste(desc[desc[,1]=="nwifeinc",2]),
"\neduc is ", paste(desc[desc[,1]=="educ",2]),
"\nexper is ", paste(desc[desc[,1]=="exper",2]),
"\nexpersq is ", paste(desc[desc[,1]=="expersq",2]),
"\nage is ", paste(desc[desc[,1]=="age",2]),
"\nkidslt6 is ", paste(desc[desc[,1]=="kidslt6",2]),
"\nand kidsge6 is ", paste(desc[desc[,1]=="kidsge6",2]),
sep="")
# Report results
{
cat("The estimated regression line is as follows. Because of heteroskedasticity in the linear probability model, we report the heteroskedasticity-robust standard errors along with the usual ones:")
reportreg(model,dig,HC=T)
}
# Interpretation
cat("In this case, the difference between the usual standard errors and the robust standard errors are very small. Therefore, while heteroskedasticity is a problem in theory, it is not in practice, at least not for this example")