nag_correg_lars_param (g02mc) calculates additional parameter estimates following Least Angle Regression (LARS), forward stagewise linear regression or Least Absolute Shrinkage and Selection Operator (LASSO) as performed by nag_correg_lars (g02ma) and nag_correg_lars_xtx (g02mb).
The full solution path for all four of these models follow a similar pattern where the parameter estimate for a given variable is piecewise linear. One such path, for a LARS model with six variables can be seen in Figure 1. Both nag_correg_lars (g02ma) and nag_correg_lars_xtx (g02mb) return the vector of parameter estimates, , at points along this path (so ). Each point corresponds to a step of the LARS algorithm. The number of steps taken depends on the model being fitted. In the case of a LARS model, and each step corresponds to a new variable being included in the model. In the case of the LASSO models, each step corresponds to either a new variable being included in the model or an existing variable being removed from the model; the value of is therefore no longer bound by the number of parameters. For forward stagewise linear regression, each step no longer corresponds to the addition or removal of a variable; therefore the number of possible steps is often markedly greater than for a corresponding LASSO model.
nag_correg_lars_param (g02mc) uses the piecewise linear nature of the solution path to predict the parameter estimates, , at a different point on this path. The location of the solution can either be defined in terms of a (fractional) step number or a function of the norm of the parameter estimates.
Efron B, Hastie T, Johnstone I and Tibshirani R (2004) Least Angle Regression The Annals of Statistics (Volume 32)2 407–499
Hastie T, Tibshirani R and Friedman J (2001) The Elements of Statistical Learning: Data Mining, Inference and Prediction Springer (New York)
Tibshirani R (1996) Regression Shrinkage and Selection via the Lasso Journal of the Royal Statistics Society, Series B (Methodological) (Volume 58)1 267–288
Weisberg S (1985) Applied Linear Regression Wiley
Compulsory Input Parameters
– double array
The first dimension of the array b must be at least .
The second dimension of the array b must be at least .
nk holds values for norm of the (scaled) parameters.
nk holds ratios with respect to the largest (scaled) norm.
nk holds values for the norm of the (unscaled) parameters.
nk holds ratios with respect to the largest (unscaled) norm.
If nag_correg_lars (g02ma) was called with or or nag_correg_lars_xtx (g02mb) was called with then the model fitting routine did not rescale the independent variables, , prior to fitting the model and therefore there is no difference between or and or .
, , , or .
– double array
Target values used for predicting the new set of parameter estimates.
if , , for ;
if , , for ;
if or , , for ;
if , , for .
Optional Input Parameters
– int64int32nag_int scalar
, the number of steps carried out in the model fitting process.
An unexpected error has been triggered by this routine. Please
Your licence key may have expired or may not have been installed correctly.
Dynamic memory allocation failed.
This example performs a LARS on a set a simulated dataset with observations and independent variables.
Additional parameter estimates are obtained corresponding to a LARS step number of and . Where, for example, corresponds to the solution halfway between that obtained at step and that obtained at step .