Displaying 1 result from an estimated 1 matches for "coefs2".
Did you mean:
coef32
2011 Jan 20
1
predict() for bootstrapped model coefficients
...("cons", names(df)[-1])))
set.seed(123)
while(i <= k){
l <- sample(1:length(df[, 1]), replace=T)
m <- update(b.mod, . ~ ., data=df[l, ], trace=F)
c.mat.1[i, ] <- coef(m)[1, ]
c.mat.2[i, ] <- coef(m)[2, ]
i <- i + 1
}
(coefs1 <- apply(c.mat.1, 2, mean))
(coefs2 <- apply(c.mat.2, 2, mean))
summary(predict(b.mod)==model.frame(b.mod)$y)
--
Sascha Vieweg, saschaview at gmail.com