HW8 Sol.pdf


Exercises 6.8,7.8, 7.12, 7.20
6.8: We remove the observations with missing values. The final dataset has 217 observations. In the regression,
since ratio is computed from the ratio of Price and DOT estimate, we don’t include variable LBERATION.
Note that we have two qualitative variables in our data.
data1=read.table(file.choose(),header=TRUE)
data1$DISTRICT.f<-factor(data1$DISTRICT)
subset1=subset(data1,SUBCONT!="*")
start=lm( LOWBID~1,data=subset1)
full=lm( LOWBID~DOTEST+STATUS+DISTRICT.f+NUMIDS+DAYSEST+RDLNGTH+
PCTASPH+PCTBASE+PCTEXCAV+PCTMOBIL+PCTSTRUC+PCTTRAF+SUBCONT,data=subset1)
summary(full)
nobs(full)
forward = step(start,scope=list(lower=start, upper=full),method="forward")
summary(forward)
backward = step(full,method="backward")
summary(backward)
(a) forward selection with AIC outcome is in the following
(b) Intercept has no meaningful interpretation because an observation with all independent variables equal to
zero is not in the data range.
beta_{dotest}: for each additional dollar increase in DOT, the mean price increases by .8862 dollars, holding
other factors constant.
beta_{status}: The mean price is 139,400 dollars higher for fixed bids than for competitive bids, holding other
factors constant.
beta_{daysest}: For each additional increase in days to complete, the mean price increases by 357.6 dollars,
holding other factors constant.