select.grpreg {grpreg}R Documentation

select an point along a grpreg path

Description

Selects a point along the regularization path of a fitted grpreg object according to the AIC, BIC, or GCV criteria.

Usage

select(obj,...)
## S3 method for class 'grpreg':
select(obj, X, y, criterion="BIC", df.method="default",
...)

Arguments

obj A fitted grpreg object.
X,y The data used to fit the model.
criterion The criterion by which to select the regularization parameter. One of "AIC", "BIC", or "GCV"; default is "BIC".
df.method How should effective model parameters be calculated? One of: "active", which counts the number of nonzero coefficients; or "default", which uses the calculated df returned by grpreg. Default is "default".
... For S3 method compatibility.

Details

The criteria are defined as follows, where L is the loss function (usually, -loglik) and n is the sample size:

AIC = 2*L + 2*df


BIC = 2*L + log(n)*df


GCV= 2*L/((1-df/n)^2)

Value

A list containing:

lambda The selected value of the regularization parameter, lambda.
beta The vector of coefficients at the chosen value of lambda.
df The effective number of model parameters at the chosen value of lambda.
IC A vector of the calculated model selection criteria for each point on the regularization path.

Author(s)

Patrick Breheny <patrick.breheny@uky.edu>

References

Breheny, P. and Huang, J. (2009) Penalized methods for bi-level variable selection. Statistics and its interface, 2: 369–380.

See Also

grpreg

Examples

data(birthwt.grpreg)
X <- as.matrix(birthwt.grpreg[,-1:-2])
y <- birthwt.grpreg$bwt
group <- c(1,1,1,2,2,2,3,3,4,5,5,6,7,8,8,8)
fit <- grpreg(X,y,group,penalty="gMCP")
select(fit,X,y)
select(fit,X,y,crit="AIC",df="active")
plot(fit$lambda,select(fit,X,y)$IC,xlim=rev(range(fit$lambda)))

[Package grpreg version 1.1 Index]