SLID1 <- read.table("c:/temp/SLID-Ontario.txt",sep = "\t",header=F,skip=1) names(SLID1) <- c("age","sex","wages","yearsed") SLID1$male <- as.numeric(SLID1$sex == "Male") SLID1$age2 <- SLID1$age^2 SLID1$yearsed2 <- SLID1$yearsed^2 SLID1$log2wages <- log2(SLID1$wages) # --------- regression with the log base 2 data ----------------- SLID1.lm2 <- lm(log2wages ~ male +age +age2 +yearsed2, data=SLID1) summary(SLID1.lm2) # the vcov function extracts the covariance matrix of the coefficient estimates vcov(SLID1.lm2)