# Example 8.1, Log Wage Equation With Heteroskedasticity-Robust Standard Errors
# Data set: wage1
# Function for result reporting
source("_report.R")
# Load the data, create a new variable and estimate the model
load("wage1.Rdata")
data$expersq=(data$exper)^2
data$tenuresq=(data$tenure)^2
data$marrmale=(data$married)*(1-data$female)
data$marrfem=(data$married)*(data$female)
data$singfem=(1-data$married)*(data$female)
model=lm(lwage~marrmale+marrfem+singfem+educ+exper+expersq+tenure+tenuresq,data=data)
dig=c(3,3,3,3,4,4,5,4,5,3)
# Describe the model
{
cat("This example closely follows Example 7.6. Here we estimate the same model as in the previous example, but report the heteroskedasticity-robust standard errors (in brackets, \"[]\") in addition to the usual standard errors (in parentheses, \"()\")")
reportreg(model,dig,HC=T)
}
# Interpretation
cat("In this particular application, any variable that was statistically significant using the usual t statistic is still statistically significant using the heteroskedasticity-robust t statistic. This occurs because the two sets of standard errors are not very different",
"\nIt turns out that the robust standard errors can be either larger or smaller than the usual standard errors. Empirically, the robust standard errors are often found to be larger than the usual standard errors",
"\nBesides, it is important to note that at this point, we do not know whether heteroskedasticity is really present",
sep="")