Learn R Programming

pass (version 1.0)

pass: Prediction and Stability Selection of Tuning Parameters

Description

To perform two methods, Kappa and PASS, for selecting tuning parameters in regularized procedures such as LASSO, SCAD, and adaptive LASSO

Usage

pass(data, base = "LASSO", lambda.grid=NULL, num.grid=20, num.split = 20, alpha = 0.1)

## S3 method for class 'pass':
print(x, ...)
## S3 method for class 'pass':
plot(x, ...)

Arguments

data
It is an n by (p+1) matrix, where the first p columns form the design matrix and the last column is response vector.
base
It is the base procedure used for variable selection. Three choices of base are "LASSO", "SCAD", and "aLASSO".
lambda.grid
It is a vector consisting of the values of tuning parameter lambda to be evaluated. If lambda.grid=NULL, a grid of lambda's will be decided automatically, with specified number of lambda's to be considered.
num.grid
It is the number of lambda's to be considered, where a grid of lambda's is decided manually or automatically. The default value is 20.
num.split
It is the number of random half-half splittings. The default value is 20.
alpha
It is the threshold only used for the Kappa selection method. It is not a tuning parameter. The default value is 0.1.
x
This is the output object of class "pass" to be used in print.pass and plot.pass.
...
Not used.

Value

  • pass.valuesThe values evaluated over lambda.grid using the PASS criterion. A curve based on these values can be drawn using function plot.pass. The maximum point is selected as the estimated optimal value for the tuning parameter lamda.
  • kappa.valuesThe values evaluated over lambda.grid using the Kappa criterion. A curve based on these values can be drawn using function plot.pass. The maximum point (adjusted for the threshold alpha) is selected as the estimated optimal value for the tuning parameter lamda.
  • lambda.passThe estimated optimal value for the tuning parameter lambda using the PASS criterion
  • lambda.kappaThe estimated optimal value for the tuning parameter lambda using the Kappa criterion (adjusted for the threshold alpha)
  • beta.passThe estimated coefficients using selected lambda by the PASS criterion
  • beta.kappaThe estimated coefficients using selected lambda by the Kappa criterion (adjusted for the threshold alpha)
  • subset.passThe selected submodel by the PASS criterion
  • subset.kappaThe selected submodel by the Kappa criterion (adjusted for the threshold alpha)

Details

Because the data matrix will be centerized so that the column means are zero, there is no need an intercept column in the data matrix. Function print.lass(x) prints the two estimated optimal values of tuning parameter lambda and function plot.lass(x) plots the two tuning parameter selection processess, where x is the output of function pass.

References

(1) Sun, Wang, and Fang (2012+) Consistent selection of tuning parameters via variable selection stability. Revision Submmitted. Available at arXiv. (2) Fang, Wang, and Sun (2012+) A PASS for tuning parameter selection in regularized regression. Submmitted. Available at arXiv.

Examples

Run this code
library(MASS)
library(lars)
library(ncvreg)

beta=c(3,1.5,0,0,2,0,0,0)
p=8
n=100
sigma=1
rho=0.5

set.seed(100)
x=matrix(0, n, p)
x[,1]<-rnorm(n, 0, 1)
for (i in 2:p) x[,i]<-rho*x[,i-1]+sqrt(1-rho^2)*rnorm(n, 0, 1)
y=x%*%beta+sigma*rnorm(n, 0, 1)
data<-cbind(x,y)

lambda.grid=10^seq(-2,2,length=20)
results<-pass(data=data, base="LASSO", lambda.grid=lambda.grid, num.grid=20, num.split=20)
print(results)
plot(results)

Run the code above in your browser using DataLab