A second alternative to estimating confidence intervals on regression parameters is to jackknife the data.
Each point in the data set is left out, one at a time, and the parameter of interest is re-estimated. The regdat
Each point in the data set is left out, one at a time, and the parameter of interest is re-estimated. The regdat
dataframe (above) has length(response) data points:
jack.reg <- numeric(35)
for (i in 1:35) {
model <- lm(response[-i]~explanatory[-i])
jack.reg[i] <- coef(model)[2] }
hist(jack.reg,main="",col="pink")
model <- lm(response~explanatory)
which(influence.measures(model)$infmat[,5]
== max(influence.measures(model)$infmat[,5]))
plot(explanatory,response,pch=21,col="green",bg="red")
abline(model,col="blue")
abline(lm(response[-22]~explanatory[-22]),col="red")