Learn R Programming

RXshrink (version 1.0-7)

RXlarlso: Maximum Likelihood Estimation of Effects in Least Angle Regression

Description

Identify whether least angle regression estimates are generalized ridge shrinkage estimates and generate TRACE displays for estimates that do correspond to ridge shrinkage factors between 0.00 and 0.99.

Usage

RXlarlso(form, data, rscale = 1, type = "lar", trace = FALSE, 
    eps = .Machine$double.eps, omdmin = 9.9e-13, ...)

Arguments

form
A regression formula [y~x1+x2+...] suitable for use with lm().
data
Data frame containing observations on all variables in the formula.
rscale
One of three possible choices (0, 1 or 2) for rescaling of variables as they are being "centered" to remove non-essential ill-conditioning: 0 implies no rescaling; 1 implies divide each variable by its standard error; 2 implies rescale as in
type
One of "lasso", "lar" or "forward.stagewise" for function lars(). Names can be abbreviated to any unique substring. Default in RXlarlso() is "lar".
trace
If TRUE, lars() function prints out its progress.
eps
The effective zero for lars().
omdmin
Strictly positive minimum allowed value for one-minus-delta (default = 9.9e-013.)
...
Optional argument(s) passed on to the lars() function from the lars R-package.

Value

  • An output list object of class RXlarlso:
  • formThe regression formula specified as the first argument.
  • dataName of the data.frame object specified as the second argument.
  • pNumber of regression predictor variables.
  • nNumber of complete observations after removal of all missing values.
  • r2Numerical value of R-square goodness-of-fit statistic.
  • s2Numerical value of the residual mean square estimate of error.
  • prinstatListing of principal statistics.
  • gmatOrthogonal matrix of direction cosines for regressor principal axes.
  • larsAn object of class lars.
  • coefMatrix of shrinkage-ridge regression coefficient estimates.
  • riskMatrix of MSE risk estimates for fitted coefficients.
  • exevMatrix of excess MSE eigenvalues (ordinary least squares minus ridge.)
  • infdMatrix of direction cosines for the estimated inferior direction, if any.
  • spatMatrix of shrinkage pattern multiplicative delta factors.
  • mlikListing of criteria for maximum likelihood selection of M-extent-of-shrinkage.
  • sextListing of summary statistics for all M-extents-of-shrinkage.

Details

RXlarlso() calls the Efron/Hastie lars() function to perform Least Angle Regression on X-variables that have been centered and possibly rescaled but which may be (highly) correlated. Maximum likelihood TRACE displays paralleling those of RXridge are also computed and (optionally) plotted.

References

Breiman L. (1995) Better subset regression using the non-negative garrote. Technometrics 37, 373-384. Efron B, Hastie T, Johnstone I, Tibshirani R. (2004) Least angle regression. Ann. Statis. 32, 407-499. Obenchain RL. (2005) Shrinkage Regression: ridge, BLUP, Bayes, spline and Stein. Electronic book-in-progress (200+ pages.) http://members.iquest.net/~softrx/ Obenchain RL. (2011) shrink.PDF RXshrink package vignette. Tibshirani R. (1996) Regression shrinkage and selection via the lasso. J. Roy. Stat. Soc. B 58, 267-288.

See Also

RXuclars.

Examples

Run this code
data(longley2)
  form <- GNP~GNP.deflator+Unemployed+Armed.Forces+Population+Year+Employed
  rxlobj <- RXlarlso(form, data=longley2)
  rxlobj
  names(rxlobj)
  plot(rxlobj)

Run the code above in your browser using DataLab