bootPredict | R Documentation |
Generate model predictions against a specified set of explanatory levels with bootstrapped confidence intervals.
bootPredict(fit, newdata, R = 100, type = "response", ...)
fit |
An object of class lm or glm |
newdata |
A data.frame |
R |
Number of simulations. Note default R=100 is very low. |
type |
he type of prediction required, see predict.glm. The default for glm models is on the scale of the response variable. Thus for a binomial model the default predictions are predicted probabilities. |
... |
Further arguments to be passed to boot::boot |
An object of class "data.frame"
data(GBSG2,package="TH.data")
fit=glm(cens~horTh+pnodes,data=GBSG2,family="binomial")
newdata=expand.grid(horTh=factor(c(1,2),labels=c("no","yes")),pnodes=1:51)
bootPredict(fit,newdata)
library(survival)
fit=coxph(Surv(time,cens)~age+horTh+progrec+pnodes,data=GBSG2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.