Title: | L1 Regularization Path for Generalized Linear Models and Cox Proportional Hazards Model |
---|---|
Description: | A path-following algorithm for L1 regularized generalized linear models and Cox proportional hazards model. |
Authors: | Mee Young Park, Trevor Hastie |
Maintainer: | Mee Young Park <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.98 |
Built: | 2024-11-06 06:18:20 UTC |
Source: | CRAN |
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.
bootstrap.path(x, y, data, B, index = NULL, path = c("glmpath", "coxpath"), method = c("aic", "bic"), trace = FALSE, ...)
bootstrap.path(x, y, data, B, index = NULL, path = c("glmpath", "coxpath"), method = c("aic", "bic"), trace = FALSE, ...)
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 |
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.
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.
Mee Young Park and Trevor Hastie
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.
coxpath, glmpath, plot.bootstrap
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)
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)
This algorithm uses predictor-corrector method to compute the entire regularization path for Cox proportional hazards model with L1 penalty.
coxpath(data, nopenalty.subset = NULL, method = c("breslow", "efron"), lambda2 = 1e-5, max.steps = 10 * min(n, m), max.norm = 100 * m, min.lambda = (if (m >= n) 1e-3 else 0), max.vars = Inf, max.arclength = Inf, frac.arclength = 1, add.newvars = 1, bshoot.threshold = 0.1, relax.lambda = 1e-7, approx.Gram = FALSE, standardize = TRUE, eps = .Machine$double.eps, trace = FALSE)
coxpath(data, nopenalty.subset = NULL, method = c("breslow", "efron"), lambda2 = 1e-5, max.steps = 10 * min(n, m), max.norm = 100 * m, min.lambda = (if (m >= n) 1e-3 else 0), max.vars = Inf, max.arclength = Inf, frac.arclength = 1, add.newvars = 1, bshoot.threshold = 0.1, relax.lambda = 1e-7, approx.Gram = FALSE, standardize = TRUE, eps = .Machine$double.eps, trace = FALSE)
data |
a list consisting of |
nopenalty.subset |
a set of indices for the predictors that are not subject to the L1 penalty |
method |
approximation method for tied survival times. Approximations derived
by Breslow (1974) and Efron (1977) are available. Default is
|
lambda2 |
regularization parameter for the L2 norm of the
coefficients. Default is |
max.steps |
an optional bound for the number of steps to be taken. Default is
|
max.norm |
an optional bound for the L1 norm of the coefficients. Default is
|
min.lambda |
an optional (lower) bound for the size of |
max.vars |
an optional bound for the number of active variables. Default is
|
max.arclength |
an optional bound for arc length (L1 norm) of a step. If
|
frac.arclength |
Under the default setting, the next step size is computed so that
the active set changes right at the next value of lambda. When
|
add.newvars |
|
bshoot.threshold |
If the absolute value of a coefficient is larger than
|
relax.lambda |
A variable joins the active set if |
approx.Gram |
If |
standardize |
If |
eps |
an effective zero |
trace |
If |
This algorithm implements the predictor-corrector method to determine the entire path of the coefficient estimates as the amount of regularization varies; it computes a series of solution sets, each time estimating the coefficients with less regularization, based on the previous estimate. The coefficients are estimated with no error at the knots, and the values are connected, thereby making the paths piecewise linear.
A coxpath
object is returned.
lambda |
vector of |
lambda2 |
|
step.length |
vector of step lengths in |
corr |
matrix of |
new.df |
vector of degrees of freedom (to be used in the plot function) |
df |
vector of degrees of freedom at each step |
loglik |
vector of log-partial-likelihood computed at each step |
aic |
vector of AIC values |
bic |
vector of BIC values |
b.predictor |
matrix of coefficient estimates from the predictor steps |
b.corrector |
matrix of coefficient estimates from the corrector steps |
new.A |
vector of boolean values indicating the steps at which the active set changed (to be used in the plot/predict functions) |
actions |
actions taken at each step |
meanx |
means of the columns of x |
sdx |
standard deviations of the columns of x |
xnames |
column names of x |
method |
method used |
nopenalty.subset |
nopenalty.subset used |
standardize |
|
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
cv.coxpath, plot.coxpath, predict.coxpath, summary.coxpath
data(lung.data) attach(lung.data) fit.a <- coxpath(lung.data) fit.b <- coxpath(lung.data, method="efron") detach(lung.data)
data(lung.data) attach(lung.data) fit.a <- coxpath(lung.data) fit.b <- coxpath(lung.data, method="efron") detach(lung.data)
This function computes cross-validated (minus) log-partial-likelihoods
for coxpath.
cv.coxpath(data, method = c("breslow", "efron"), nfold = 5, fraction = seq(0, 1, length = 100), mode = c("norm", "lambda"), plot.it = TRUE, se = TRUE, ...)
cv.coxpath(data, method = c("breslow", "efron"), nfold = 5, fraction = seq(0, 1, length = 100), mode = c("norm", "lambda"), plot.it = TRUE, se = TRUE, ...)
data |
a list consisting of |
method |
approximation method for tied survival times. Approximations derived
by Breslow (1974) and Efron (1977) are available. Default is
|
nfold |
number of folds to be used in cross-validation. Default is
|
fraction |
the fraction of L1 norm or log( |
mode |
If |
plot.it |
If |
se |
If |
... |
other options for coxpath |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
coxpath, plot.coxpath, predict.coxpath
data(lung.data) attach(lung.data) cv <- cv.coxpath(lung.data) detach(lung.data)
data(lung.data) attach(lung.data) cv <- cv.coxpath(lung.data) detach(lung.data)
This function computes cross-validated (minus) log-likelihoods or
prediction errors for glmpath.
cv.glmpath(x, y, data, family = binomial, weight = rep(1, n), offset = rep(0, n), nfold = 10, fraction = seq(0, 1, length = 100), type = c("loglik", "response"), mode = c("norm", "lambda"), plot.it = TRUE, se = TRUE, ...)
cv.glmpath(x, y, data, family = binomial, weight = rep(1, n), offset = rep(0, n), nfold = 10, fraction = seq(0, 1, length = 100), type = c("loglik", "response"), mode = c("norm", "lambda"), plot.it = TRUE, se = TRUE, ...)
x |
matrix of features |
y |
response |
data |
a list consisting of |
family |
name of a family function that represents the distribution of y to
be used in the model. It must be |
weight |
an optional vector of weights for observations |
offset |
an optional vector of offset. If a column of |
nfold |
number of folds to be used in cross-validation. Default is
|
fraction |
the fraction of L1 norm or log( |
type |
If |
mode |
If |
plot.it |
If |
se |
If |
... |
other options for glmpath |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
glmpath, plot.glmpath, predict.glmpath
data(heart.data) attach(heart.data) cv.a <- cv.glmpath(x, y, family=binomial) cv.b <- cv.glmpath(x, y, family=binomial, type="response") detach(heart.data)
data(heart.data) attach(heart.data) cv.a <- cv.glmpath(x, y, family=binomial) cv.b <- cv.glmpath(x, y, family=binomial, type="response") detach(heart.data)
This algorithm uses predictor-corrector method to compute the entire regularization path for generalized linear models with L1 penalty.
glmpath(x, y, data, nopenalty.subset = NULL, family = binomial, weight = rep(1, n), offset = rep(0, n), lambda2 = 1e-5, max.steps = 10 * min(n, m), max.norm = 100 * m, min.lambda = (if (m >= n) 1e-6 else 0), max.vars = Inf, max.arclength = Inf, frac.arclength = 1, add.newvars = 1, bshoot.threshold = 0.1, relax.lambda = 1e-8, standardize = TRUE, eps = .Machine$double.eps, trace = FALSE)
glmpath(x, y, data, nopenalty.subset = NULL, family = binomial, weight = rep(1, n), offset = rep(0, n), lambda2 = 1e-5, max.steps = 10 * min(n, m), max.norm = 100 * m, min.lambda = (if (m >= n) 1e-6 else 0), max.vars = Inf, max.arclength = Inf, frac.arclength = 1, add.newvars = 1, bshoot.threshold = 0.1, relax.lambda = 1e-8, standardize = TRUE, eps = .Machine$double.eps, trace = FALSE)
x |
matrix of features |
y |
response |
data |
a list consisting of |
nopenalty.subset |
a set of indices for the predictors that are not subject to the L1 penalty |
family |
name of a family function that represents the distribution of y to
be used in the model. It must be |
weight |
an optional vector of weights for observations |
offset |
an optional vector of offset. If a column of |
lambda2 |
regularization parameter for the L2 norm of the
coefficients. Default is |
max.steps |
an optional bound for the number of steps to be taken. Default is
|
max.norm |
an optional bound for the L1 norm of the coefficients. Default is
|
min.lambda |
an optional (lower) bound for the size of |
max.vars |
an optional bound for the number of active variables. Default is
|
max.arclength |
an optional bound for arc length (L1 norm) of a step. If
|
frac.arclength |
Under the default setting, the next step size is computed so that
the active set changes right at the next value of lambda. When
|
add.newvars |
|
bshoot.threshold |
If the absolute value of a coefficient is larger than
|
relax.lambda |
A variable joins the active set if |
standardize |
If |
eps |
an effective zero |
trace |
If |
This algorithm implements the predictor-corrector method to determine the entire path of the coefficient estimates as the amount of regularization varies; it computes a series of solution sets, each time estimating the coefficients with less regularization, based on the previous estimate. The coefficients are estimated with no error at the knots, and the values are connected, thereby making the paths piecewise linear.
A glmpath
object is returned.
lambda |
vector of |
lambda2 |
|
step.length |
vector of step lengths in |
corr |
matrix of |
new.df |
vector of degrees of freedom (to be used in the plot function) |
df |
vector of degrees of freedom at each step |
deviance |
vector of deviance computed at each step |
aic |
vector of AIC values |
bic |
vector of BIC values |
b.predictor |
matrix of coefficient estimates from the predictor steps |
b.corrector |
matrix of coefficient estimates from the corrector steps |
new.A |
vector of boolean values indicating the steps at which the active set changed (to be used in the plot/predict functions) |
actions |
actions taken at each step |
meanx |
means of the columns of x |
sdx |
standard deviations of the columns of x |
xnames |
column names of x |
family |
family used |
weight |
weights used |
offset |
offset used |
nopenalty.subset |
nopenalty.subset used |
standardize |
|
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
cv.glmpath, plot.glmpath, predict.glmpath, summary.glmpath
data(heart.data) attach(heart.data) fit.a <- glmpath(x, y, family=binomial) fit.b <- glmpath(x, y, family=gaussian) detach(heart.data)
data(heart.data) attach(heart.data) fit.a <- glmpath(x, y, family=binomial) fit.b <- glmpath(x, y, family=gaussian) detach(heart.data)
South African Heart Disease dataset used to test glmpath
algorithm
data(heart.data)
data(heart.data)
A dataset with 462 observations on 9 variables and a binary response.
x contains 9 columns of the following variables: sbp (systolic blood pressure); tobacco (cumulative tobacco); ldl (low density lipoprotein cholesterol); adiposity; famhist (family history of heart disease); typea (type-A behavior); obesity; alcohol (current alcohol consumption); age (age at onset)
response, coronary heart disease
Hastie, T., Tibshirani, R., and Friedman, J. (2001) Elements of Statistical Learning; Data Mining, Inference, and Prediction Springer-Verlag, New York.
data(heart.data) attach(heart.data) fit <- glmpath(x, y, family=binomial) detach(heart.data)
data(heart.data) attach(heart.data) fit <- glmpath(x, y, family=binomial) detach(heart.data)
Lung cancer dataset used to test coxpath
algorithm
data(lung.data)
data(lung.data)
A dataset consisting of 137 observations with their survival time, censor status as well as 6 features.
x contains 6 columns of the following variables: trt (1=standard treatment, and 2=test); celltype (1=squamous, 2=smallcell, 3=adeno, and 4=large); karno (Karnofsky performance score); diagtime (months from diagnosis to randomization); age (in years); prior (prior therapy 0=no, and 1=yes)
survival time
censor status
Kalbfleisch, J. and Prentice, R. (2002) The Statistical Analysis of Failure Time Data J. Wiley, Hoboken, N.J.
data(lung.data) attach(lung.data) fit <- coxpath(lung.data) detach(lung.data)
data(lung.data) attach(lung.data) fit <- coxpath(lung.data) detach(lung.data)
This function takes a bootpath
object from
bootstrap.path
and generates the histograms or the pairwise
scatter plots of the bootstrap coefficients.
## S3 method for class 'bootpath' plot(x, type = c("histogram", "pairplot"), mfrow = NULL, mar = NULL, ...)
## S3 method for class 'bootpath' plot(x, type = c("histogram", "pairplot"), mfrow = NULL, mar = NULL, ...)
x |
a |
type |
If |
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 |
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.
Mee Young Park and Trevor Hastie
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.
bootstrap.path, coxpath, glmpath
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)
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)
This function takes a coxpath
object and visualizes the
regularization path. The horizontal axis can be norm,
lambda
or step.
The vertical axis can be
coefficients,
aic
or bic.
## S3 method for class 'coxpath' plot(x, xvar = c("norm", "lambda", "step"), type = c("coefficients", "aic", "bic"), plot.all.steps = FALSE, xlimit = NULL, predictor = FALSE, omit.zero = TRUE, breaks = TRUE, mar = NULL, main = NULL, eps = .Machine$double.eps, ...)
## S3 method for class 'coxpath' plot(x, xvar = c("norm", "lambda", "step"), type = c("coefficients", "aic", "bic"), plot.all.steps = FALSE, xlimit = NULL, predictor = FALSE, omit.zero = TRUE, breaks = TRUE, mar = NULL, main = NULL, eps = .Machine$double.eps, ...)
x |
a |
xvar |
horizontal axis. |
type |
type of the plot, or the vertical axis. Default is
|
plot.all.steps |
If |
xlimit |
When the user wants to visualize a (beginning) sub-part of the plot,
|
predictor |
If |
omit.zero |
If |
breaks |
If |
mar |
margin relative to the current font size |
main |
title of the plot |
eps |
an effective zero |
... |
other options for the plot |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
cv.coxpath, coxpath, predict.coxpath
data(lung.data) attach(lung.data) fit <- coxpath(lung.data) par(mfrow=c(3, 2)) plot(fit) plot(fit, xvar="lambda") plot(fit, xvar="step") plot(fit, xvar="step", xlimit=8) plot(fit, type="aic") plot(fit, type="bic") detach(lung.data)
data(lung.data) attach(lung.data) fit <- coxpath(lung.data) par(mfrow=c(3, 2)) plot(fit) plot(fit, xvar="lambda") plot(fit, xvar="step") plot(fit, xvar="step", xlimit=8) plot(fit, type="aic") plot(fit, type="bic") detach(lung.data)
This function takes a glmpath
object and visualizes the
regularization path. The horizontal axis can be norm,
lambda
or step.
The vertical axis can be
coefficients,
aic
or bic.
## S3 method for class 'glmpath' plot(x, xvar = c("norm", "lambda", "step"), type = c("coefficients", "aic", "bic"), plot.all.steps = FALSE, xlimit = NULL, predictor = FALSE, omit.zero = TRUE, breaks = TRUE, mar = NULL, eps = .Machine$double.eps, main = NULL, ...)
## S3 method for class 'glmpath' plot(x, xvar = c("norm", "lambda", "step"), type = c("coefficients", "aic", "bic"), plot.all.steps = FALSE, xlimit = NULL, predictor = FALSE, omit.zero = TRUE, breaks = TRUE, mar = NULL, eps = .Machine$double.eps, main = NULL, ...)
x |
a |
xvar |
horizontal axis. |
type |
type of the plot, or the vertical axis. Default is
|
plot.all.steps |
If |
xlimit |
When the user wants to visualize a (beginning) sub-part of the plot,
|
predictor |
If |
omit.zero |
If |
breaks |
If |
mar |
margin relative to the current font size |
eps |
an effective zero |
main |
title of the plot |
... |
other options for the plot |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
cv.glmpath, glmpath, predict.glmpath
data(heart.data) attach(heart.data) fit <- glmpath(x, y, family=binomial) par(mfrow=c(3, 2)) plot(fit) plot(fit, xvar="lambda") plot(fit, xvar="step") plot(fit, xvar="step", xlimit=8) plot(fit, type="aic") plot(fit, type="bic") detach(heart.data)
data(heart.data) attach(heart.data) fit <- glmpath(x, y, family=binomial) par(mfrow=c(3, 2)) plot(fit) plot(fit, xvar="lambda") plot(fit, xvar="step") plot(fit, xvar="step", xlimit=8) plot(fit, type="aic") plot(fit, type="bic") detach(heart.data)
This function makes predictions at particular points along the fitted
coxpath.
The coefficients, log-partial-likelihood, linear
predictor or the risk can be computed. A coxph
object can be
returned at one particular value of
## S3 method for class 'coxpath' predict(object, data, s, type = c("coefficients", "loglik", "lp", "risk", "coxph"), mode = c("step", "norm.fraction", "norm", "lambda.fraction", "lambda"), eps = .Machine$double.eps, ...)
## S3 method for class 'coxpath' predict(object, data, s, type = c("coefficients", "loglik", "lp", "risk", "coxph"), mode = c("step", "norm.fraction", "norm", "lambda.fraction", "lambda"), eps = .Machine$double.eps, ...)
object |
a |
data |
a list containing |
s |
the values of |
type |
If |
mode |
what |
eps |
an effective zero |
... |
other options for the prediction |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
cv.coxpath, coxpath, plot.coxpath
data(lung.data) attach(lung.data) fit <- coxpath(lung.data) pred.a <- predict(fit, x, s = seq(0, 1, length=10), mode = "norm.fraction") library(survival) pred.b <- predict(fit, lung.data, s = 0.5, type = "coxph", mode = "lambda.fraction") pred.s <- survfit(pred.b) plot(pred.s) detach(lung.data)
data(lung.data) attach(lung.data) fit <- coxpath(lung.data) pred.a <- predict(fit, x, s = seq(0, 1, length=10), mode = "norm.fraction") library(survival) pred.b <- predict(fit, lung.data, s = 0.5, type = "coxph", mode = "lambda.fraction") pred.s <- survfit(pred.b) plot(pred.s) detach(lung.data)
This function makes predictions at particular points along the fitted
glmpath.
The linear predictor, estimated response,
log-likelihood, or the coefficients can be computed.
## S3 method for class 'glmpath' predict(object, newx, newy, s, type = c("link", "response", "loglik", "coefficients"), mode = c("step", "norm.fraction", "norm", "lambda.fraction", "lambda"), weight = NULL, offset = NULL, eps = .Machine$double.eps, ...)
## S3 method for class 'glmpath' predict(object, newx, newy, s, type = c("link", "response", "loglik", "coefficients"), mode = c("step", "norm.fraction", "norm", "lambda.fraction", "lambda"), weight = NULL, offset = NULL, eps = .Machine$double.eps, ...)
object |
a |
newx |
a matrix of features at which the predictions are made. If
|
newy |
a vector of responses corresponding to |
s |
the values of |
type |
If |
mode |
what |
weight |
an optional vector of weights for observations. |
offset |
If |
eps |
an effective zero |
... |
other options for the prediction |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
cv.glmpath, glmpath, plot.glmpath
data(heart.data) attach(heart.data) fit <- glmpath(x, y, family=binomial) pred <- predict(fit, x, s = seq(0, 1, length=10), mode="norm.fraction") detach(heart.data)
data(heart.data) attach(heart.data) fit <- glmpath(x, y, family=binomial) pred <- predict(fit, x, s = seq(0, 1, length=10), mode="norm.fraction") detach(heart.data)
This function produces an anova-type summary for a coxpath object.
## S3 method for class 'coxpath' summary(object, ...)
## S3 method for class 'coxpath' summary(object, ...)
object |
a |
... |
additional arguments |
An anova type of summary is returned, including Df, Log-partial-likelihood, AIC, and BIC values for the steps where the active set changed.
A data.frame is returned, with the following components at transition points:
Df |
degrees of freedom at each step |
Log.p.lik |
log-partial-likelihood at each step |
AIC |
AIC value at each step |
BIC |
BIC value at each step |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
coxpath, plot.coxpath, print.coxpath
data(lung.data) attach(lung.data) fit <- coxpath(lung.data) summary(fit) detach(lung.data)
data(lung.data) attach(lung.data) fit <- coxpath(lung.data) summary(fit) detach(lung.data)
This function produces an anova-type summary for a glmpath object.
## S3 method for class 'glmpath' summary(object, ...)
## S3 method for class 'glmpath' summary(object, ...)
object |
a |
... |
additional arguments |
An anova type of summary is returned, including Df, Deviance, AIC, and BIC values for the steps where the active set changed.
A data.frame is returned, with the following components at transition points:
Df |
degrees of freedom at each step |
Deviance |
deviance computed at each step |
AIC |
AIC value at each step |
BIC |
BIC value at each step |
Mee Young Park and Trevor Hastie
Mee Young Park and Trevor Hastie (2007) L1 regularization path algorithm for generalized linear models. J. R. Statist. Soc. B, 69, 659-677.
glmpath, plot.glmpath, print.glmpath
data(heart.data) attach(heart.data) fit <- glmpath(x, y) summary(fit) detach(heart.data)
data(heart.data) attach(heart.data) fit <- glmpath(x, y) summary(fit) detach(heart.data)