bootstrap.path {glmpath} | R Documentation |
Generates a set of bootstrap coefficients for glmpath or coxpath
Description
This function generates a set of bootstrap coefficients for
glmpath
or coxpath.
For each bootstrap run, the
regularization parameter may be determined based on either aic
or bic.
Usage
bootstrap.path(x, y, data, B, index = NULL,
path = c("glmpath", "coxpath"),
method = c("aic", "bic"), trace = FALSE, ...)
Arguments
x |
matrix of features |
y |
response |
data |
a list of data components. If |
B |
number of bootstrap runs |
index |
matrix ( |
path |
Bootstrap coefficients for either |
method |
For each bootstrap run, the regularization parameter is determined
based on either |
trace |
If |
... |
other options for |
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
bootstrap analysis. plot.bootstrap
summarizes the bootstrap
results by generating the histograms or the pair scatter plots of the
bootstrap coefficients.
Value
bootstrap.path
returns a bootpath
object, which is a
matrix (B
by ncol(x)
) of bootstrap
coefficients. Coefficients computed from the whole data are stored as
an attribute coefficients.
Author(s)
Mee Young Park and Trevor Hastie
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
coxpath, glmpath, plot.bootstrap
Examples
data(heart.data)
attach(heart.data)
bootstrap.a <- bootstrap.path(x, y, B=5, method="bic")
detach(heart.data)
data(lung.data)
attach(lung.data)
bootstrap.b <- bootstrap.path(data=lung.data, B=5, path="coxpath")
detach(lung.data)