## Not run:
# ## Generate some data
#
# ## 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))
#
# ## Find a penalty (starting from a large value, here: 5000)
# ## that leads to an optimal number of boosting steps (based in AIC)
# ## in the range [50,200] and return a GLMBoost fit with
# ## this penalty
#
# opt.gb1 <- optimGLMBoostPenalty(x,y,minstepno=50,maxstepno=200,
# start.penalty=5000,family=binomial(),
# trace=TRUE)
#
# # extract the penalty found/used for the fit
# opt.gb1$penalty
#
# ## End(Not run)
Run the code above in your browser using DataLab