plot.GAMBoost: Plots of the smooth functions from a GAMBoost fit

Description Usage Arguments Value Author(s) Examples

View source: R/GAMBoost.R

Description

Generates plots for the smooth components from a GAMBoost fit at a specific boosting step.

Usage

1
2
## S3 method for class 'GAMBoost'
plot(x,select=NULL,at.step=NULL,add=FALSE,phi=1,ylim=NULL,xlab=NULL,ylab=NULL,...)

Arguments

x

fitted GAMBoost object from a GAMBoost call.

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 NULL.

...

miscellaneous plotting parameters given to the low level plotting routine.

Value

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).

Author(s)

Harald Binder [email protected]

Examples

 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)

GAMBoost documentation built on May 30, 2017, 3:50 a.m.