Learn R Programming

extlasso (version 0.3)

coef.extlasso: Extract coefficients from a fitted extlasso object

Description

The function returns the coefficients from a fitted extlasso object

Usage

# S3 method for extlasso
coef(object,...)

Arguments

object

A `extlasso' object obtained using `extlasso' function.

...

Not used

Value

Estimated coefficients for different lambdas starting from maximum value of lambda to minimum value of lambda

References

Mandal, B.N. and Jun Ma, (2014). A Jacobi-Armijo Algorithm for LASSO and its Extensions.

Examples

Run this code
# NOT RUN {
x=matrix(rnorm(100*30),100,30)
y=sample(c(0,1),100,replace=TRUE)
g1=extlasso(x,y,family="binomial")
coef(g1)
x=matrix(rnorm(100*30),100,30)
y=rnorm(100)
g1=extlasso(x,y,family="normal")
coef(g1)
# }

Run the code above in your browser using DataLab