Description Usage Arguments Value Author(s) Examples
Generates plots for the smooth components from a GAMBoost
fit at a specific boosting step.
1 2 |
x |
fitted GAMBoost object from a |
select |
indices of the smooth component(s) for which plots should be generated. If none are specified, all are used. |
at.step |
boosting step from which the estimates for the smooth functions should be evaluated. If not given, the final boosting step is used. |
add |
logical value indicating whether the plot(s) should be added to the current plot. |
phi |
scale parameter for the confidence bands. |
ylim,xlab,ylab |
standard plotting parameters for plotting range and axis labels. Automatically set if |
... |
miscellaneous plotting parameters given to the low level plotting routine. |
A plot is produced for the specified smooth components in the GAMBoost
fit. Pointwise confidence bands are plotted when the standard error information has been calculated (option calc.se=TRUE
in the call to GAMBoost
).
Harald Binder binderh@uni-mainz.de
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Generate some data
x <- matrix(runif(100*8,min=-1,max=1),100,8)
eta <- -0.5 + 2*x[,1] + 2*x[,3]^2
y <- rbinom(100,1,binomial()$linkinv(eta))
## Fit the model with smooth components
gb1 <- GAMBoost(x,y,penalty=400,stepno=100,trace=TRUE,family=binomial())
## Plot smooth components of fit
# all, at final boosting step
par(mfrow=c(2,4))
plot(gb1)
# components that received an update up to the 'optimal' boosting step
selected <- getGAMBoostSelected(gb1,at.step=which.min(gb1$AIC))
par(mfrow=c(1,length(selected$smooth)))
plot(gb1,select=selected$smooth)
# components where the estimate at the 'optimal' boosting step does not
# contain the null line
par(mfrow=c(1,length(selected$smoothbands)))
plot(gb1,select=selected$smoothbands)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.