Learn R Programming

oem (version 1.01)

oemfit: fit a penalized least squares with orthogonalizing EM algorithm

Description

Fit a least squares model via penalized maximum likelihood. The regularization path is computed for several different penalties at a grid of values for the regularization patameter lambda.

Usage

oemfit (formula, data = list(), lambda = NULL, nlambda = 100,
        lambda.min.ratio = NULL, tolerance = 1e-3,
        maxIter = 1000, standardized = TRUE, numGroup = 1,
        penalty = c("lasso", "scad", "ols", "elastic.net",
        "ngarrote", "mcp"), alpha = 3,
        evaluate = 0, condition = -1)

Arguments

formula
an object of 'formula' (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under 'Details'
data
an optional data frame, list or environment (or object coercible by 'as.data.frame' to a data frame) containing the variables in the model. If not found in 'data', the variables are taken from 'environment(formula)', typically the environ
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.
nlambda
The number of lambda values - default is 100.
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 depends on the sample size nobs relative to th
tolerance
Convergence tolerance for OEM. Each inner OEM loop continues until the maximum change in the objective after any coefficient update is less than tolerance. Defaults value is 1E-3.
maxIter
Maximum number of passes over the data for all lambda values; default is 1000.
standardized
Logical flag for x variable standardization, prior to fitting the model sequence. The coefficients are always returned on the original scale. Default is standardize=TRUE. If variables are in the same units already, you might not w
numGroup
Integer value for the number of groups to use for OEM fitting. Default is 1.
penalty
Penalty type in lower letters. Different types include 'lasso', 'scad', 'ols' (ordinary least square), 'elastic-net', 'ngarrote' (non-negative garrote) and 'mcp'.
alpha
alpha value for scad and mcp.
evaluate
Debugging argument.
condition
Debugging for different ways of calculating OEM.

Value

  • An object with S3 class "oemfit"

Details

The sequence of models implied by 'lambda' is fit by OEM algorithm.

References

Xiong, S., Dai, B. and Qian, P. Z. G. (2011), Orthogonalizing Penalized Regression, http://www.stat.wisc.edu/~zhiguang/OEM.pdf

See Also

cv.oemfit, print.oemfit, plot.oemfit, predict.oemfit

Examples

Run this code
x=matrix(rnorm(100*20),100,20)
y=rnorm(100)
fit <- oemfit(y~x)

Run the code above in your browser using DataLab