Description Usage Arguments Value Examples
Perform compressed (penalized) linear regression
1 2 3 4 |
X |
the design matrix |
Y |
the response vector |
compression |
either none ('xy'), full compression ('qxqy'), partial compression ('qxy'), linear combination ('linComb') or the convex combination ('convexComb') |
q |
columns in the compression matrix |
lam |
optional values of the tuning parameter. Default is |
lam.max |
defaults to the maximum L1-norm of the covariates divided by 1e-3 |
lam.min |
defaults to 1e-6, unless the smallest singular value is larger than |
nlam |
number of lambda values, default is 100, 101 if 0 is included |
s |
|
tol.lam0 |
determines how close to singular the design can be and still try to
use |
tol.lc |
determines how close to singular the matrix of fitted values can be. Compares with
the smallest singular value. Default is then a 50-50 combination of |
A list with components of class 'cplr':
intercept
a vector of length nlam
containing the intercept
bhat
a matrix of size p x nlam
containing the estimated coefficients
bhatsc
a matrix of size p x nlam
containing the scaled,
estimated coefficients. For use with the plot
method.
fitted
a matrix of size n x nlam
containing fitted values
residuals
a matrix of size n x nlam
containing residuals
GCV
The generalized cross validation score for model selection.
lam
The sequence of lam
values used. Either generated or user supplied.
df
The degrees of freedom of the procedure. If full or partial compression, this is the trace of the smoothing matrix. For the other cases, the procedure is not a linear smoother, but rather a weighted sum of two linear smoothers. In that case, this value is simply the weighted sum of the two linear procedures. Note that this likely underestimates the true degrees of freedom.
train
The training error for each value of lam
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.