Cwomen1 <- read.table("c:/temp/BFox.txt",header=F,skip=1) names(Cwomen1) <- c("year","participation","tfr","menWages","womenWages","debt","parttime") Cwomen1$tfr <- Cwomen1$tfr*(Cwomen1$year != 1973) +1931*(Cwomen1$year == 1973) Cwomen1.lm1 <- lm(participation ~ tfr +menWages +womenWages +debt +parttime +year, data=Cwomen1) # Use the vif function from the car package library(car) vif(Cwomen1.lm1) # Conduct principal component analysis with the princomp function Cwomen1.pca <- princomp(Cwomen1[,c(1,3,4,5,6,7)], cor=TRUE) summary(Cwomen1.pca) loadings(Cwomen1.pca) plot(Cwomen1.pca,type="lines")