predict.GLMBoost: Predict method for GLMBoost fits

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
2
## S3 method for class 'GLMBoost'
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).

Author(s)

Harald Binder binderh@uni-mainz.de

See Also

GLMBoost, GAMBoost, predict.GAMBoost.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
##  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")

GAMBoost documentation built on May 2, 2019, 12:40 p.m.