bootPredict {autoReg}R Documentation

Bootstrap simulation for model prediction

Description

Generate model predictions against a specified set of explanatory levels with bootstrapped confidence intervals.

Usage

bootPredict(fit, newdata, R = 100, type = "response", ...)

Arguments

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

Value

An object of class "data.frame"

Examples

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)

[Package autoReg version 0.3.3 Index]