fit0 | <- glm(y ∼ x1 + x2 + x3, family=binomial, data=data0) #reprise the fit |
p | <- predict(fit0, newdata=data1) #default type is the linear predictor |
group | <- cut(p, c(-Inf, quantile(p,(1:9)/10), Inf)) |
fit1 | <- glm(y ∼ offset(p), family=binomial, data=data1) |
fit2 | <- glm(y ∼ p, family=binomial, data=data1) |
fit3 | <- glm(y ∼ −1 + group + offset(p), family=binomial, data=data1) |