predict.GLMBoost {GAMBoost} | R Documentation |
Convienience wrapper for predict.GAMBoost
, for obtaining predictions at specified boosting steps from a GAMBoost object fitted by GLMBoost
.
## S3 method for class 'GLMBoost': predict(object,newdata=NULL,...)
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 returned by predict.GAMBoost
(see documentation there).
Harald Binder binderh@fdm.uni-freiburg.de
GLMBoost
, GAMBoost
, predict.GAMBoost
.
## 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")