Skip to main content
. Author manuscript; available in PMC: 2017 Aug 1.
Published in final edited form as: Stat Methods Med Res. 2013 Jul 30;25(4):1692–1706. doi: 10.1177/0962280213497434
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)