GAMBoost (version 1.2-3)

predict.GLMBoost: Predict method for GLMBoost fits

Description

Convienience wrapper for predict.GAMBoost, for obtaining predictions at specified boosting steps from a GAMBoost object fitted by GLMBoost.

Usage

"predict"(object,newdata=NULL,...)

Arguments

object
fitted GAMBoost object from a GLMBoost call.
newdata
n.new * q matrix with new covariate values for linear components. If just prediction for the training data is wanted, it can be omitted.
...
arguments that should be passed to predict.GAMBoost.

Value

Value returned by predict.GAMBoost (see documentation there).

See Also

GLMBoost, GAMBoost, predict.GAMBoost.

Examples

Run this code
##  Generate some data 
x <- matrix(runif(100*8,min=-1,max=1),100,8)             
eta <- -0.5 + 2*x[,1] + 4*x[,3]
y <- rbinom(100,1,binomial()$linkinv(eta))

##  Fit the model with only linear components
gb1 <- GLMBoost(x,y,penalty=100,stepno=100,trace=TRUE,family=binomial()) 

##  Extract predictions

#   at final boosting step
predict(gb1,type="response")

#   at 'optimal' boosting step (with respect to AIC)
predict(gb1,at.step=which.min(gb1$AIC),type="response")

#   matrix with predictions at predictor level for all boosting steps
predict(gb1,at.step=1:100,type="link")

Run the code above in your browser using DataLab