glmpath (version 0.98)

plot.bootpath: Generates the histograms or the pairwise scatter plots of the bootstrap coefficients computed from bootstrap.path

Description

This function takes a bootpath object from bootstrap.path and generates the histograms or the pairwise scatter plots of the bootstrap coefficients.

Usage

# S3 method for bootpath
plot(x, type = c("histogram", "pairplot"),
     mfrow = NULL, mar = NULL, ...)

Arguments

x

a bootpath object from bootstrap.path.

type

If type=histogram, the histograms of bootstrap coefficients for individual features are generated. The red vertical bar indicates the coefficient computed using the whole data. The thick bar at zero indicates the frequency of the zero coefficients. If type=pairplot, the pairwise scatter plots of the bootstrap coefficients are generated. The red solid dot indicates the pair of coefficients computed using the whole data. Default is histogram.

mfrow

determines the numbers of rows and columns of the histograms on a page. 2 rows are generated as a default.

mar

margin relative to the current font size

...

other options for the plot

Details

Fitting glmpath or coxpath gives a series of solution sets with a varying size of the active set. Once we select an appropriate value of the regularization parameter, and, thus a set of coefficients, we may then validate the chosen coefficients through a bootstrap analysis. plot.bootstrap summarizes the bootstrap results by generating the histograms or the pairwise scatter plots of the bootstrap coefficients.

References

Bradley Efron and Robert Tibshirani (1993) An Introduction to the Bootstrap CHAPMAN & HALL/CRC, Boca Raton.

Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.

See Also

bootstrap.path, coxpath, glmpath

Examples

Run this code
# NOT RUN {
data(heart.data)
attach(heart.data)
bootstrap.a <- bootstrap.path(x, y, B=5)
plot(bootstrap.a)
plot(bootstrap.a, type="pairplot")
detach(heart.data)
# }

Run the code above in your browser using DataLab