# NOTE: Before running this R program you need to install the "lmtest" package
# to augment your standard R software and then load it right before you
# run this program.
# Read in the data from a text file
ceosalary1 <- read.table("e:/data/ceosal1.txt",TRUE)
# Run the simple linear regression in Chapter 2 of Wooldridge
ceo <- lm(salary ~ roe, ceosalary1)
summary(ceo)
anova(ceo)
# Before you can run the Bruesch-Pagan test for heteroskedasticity
# you will have to download the package "lmtest". It is not part a part
# of the standar R download from Cran-R.
bptest(ceo)
bp
# Now run a full regression
ceofull <- lm(lsalary ~ roe + lsales + ros + indus + finance + consprod, ceosalary1)
summary(ceofull)
# Now run a Reduced Regression
ceoreduced <- lm(lsalary ~ roe + lsales + indus + finance + consprod, ceosalary1)
summary(ceoreduced)