# Load the CPS data: install.packages("AER") library(AER) data("CPS1985") attach(CPS1985) # Estimate the model: summary(lm(wage ~ gender)) # Take the sample mean for the two groups mean(wage[gender == "male"]) mean(wage[gender == "female"])