## Not run:
# ## 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())
#
#
# ## 10-fold cross-validation with prediction error as a criterion
# gb1.crit <- cv.GLMBoost(x,y,penalty=100,maxstepno=100,trace=TRUE,
# family=binomial(),
# K=10,type="error")
#
# ## Compare AIC and estimated prediction error
#
# which.min(gb1$AIC)
# which.min(gb1.crit$criterion)
# ## End(Not run)
Run the code above in your browser using DataLab