Skip to content
Prev 87195 / 398506 Next

predicting glm on a new dataset

Christian Jones wrote:
Does this work for you?

orig.frame <- data.frame(y, a, b)
pred.frame <- data.frame(a, b = b + x)
modela <- glm(y ~ a + b, family = binomial, data = orig.frame)
pr <- predict(modela, newdata = pred.frame, type = "response")