Learn R Programming

sparc (version 0.9.0)

sparc: Training function of Semiparametric Generalized Linear Models

Description

Pathwise Iterative Soft Thresholding Algorithm

Usage

sparc(X, y, lambda = NULL, lambda.min.ratio=NULL, nlambda = NULL, thol = 1e-4, max.ite = 1e4, alpha = sqrt(1/2))

Arguments

X
The n by d design matrix of the training set, where n is sample size and d is dimension.
y
The n-dimensional response vector of the training set, where n is sample size.
lambda
A user supplied lambda sequence. Typical usage is to have the program compute its own lambda sequence based on nlambda and lambda.min.ratio. Supplying a value of lambda overrides this. WARNING: use with care. Do not supply a single value for lambda. Supply instead a decreasing sequence of lambda values. sparc relies on its warms starts for speed, and its often faster to fit a whole path than compute a single fit.
nlambda
The number of lambda values. The default value is 30.
lambda.min.ratio
Smallest value for lambda, as a fraction of lambda.max, the (data derived) entry value (i.e. the smallest value for which all coefficients are zero). The default is 0.1.
thol
Stopping precision. The default value is 1e-4.
max.ite
The number of maximum iterations. The default value is 1e4.
alpha
The backtracking linea search parameter. The default value is sqrt(1/2).

Value

w
The d by nlambda Regularization Path. The j-th column is the estimation coefficient corresponding to the j-th regularization parameter.

Details

We adopt pathwise Iterative Soft Thresholding Algorithm.

References

Y. Ning, Y. Chen, and H. Liu. "High Dimensional Semiparametric Generalized Linear Models", Technical Report, 2013.

See Also

sparc-package

Examples

Run this code
## generating training data
n = 100
d = 200
set.seed(3)
X = matrix(rnorm(n*d),n,d)
y = 3*X[,1]+2*X[,2] + 1.5*X[,4] + rnorm(n)

## estimating models
out = sparc(X,y)

Run the code above in your browser using DataLab