predict.nnlasso: Prediction of coefficients of a penalized linear regression...

Description Usage Arguments Value Author(s) References Examples

Description

The function computes estimated coefficients value at a given lambda or L1 norm or fraction of norm using a ‘nnlasso’ object obtained using ‘nnlasso’ function.

Usage

1
2
## S3 method for class 'nnlasso'
predict(object,mode=c("fraction","norm","lambda"),at=0,...)

Arguments

object

A ‘nnlasso’ object obtained using ‘nnlasso’ function.

mode

If mode="lambda", prediction is made for a given lambda, if mode="norm", prediction is made for a given L1 norm and if mode="fraction", prediction is made for a fraction of norm value. Default is mode="lambda"

at

A value at which prediction is to be made. Default is at = 0.

...

Not used. Other arguments to predict.

Value

A vector of estimated coefficients of length p or p+1 at the given value of lambda or L1 norm or fraction of norm, depending on intercept=TRUE or FALSE in ‘nnlasso’ object. Here p is number of predictor variables.

Author(s)

Baidya Nath Mandal and Jun Ma

References

Mandal, B.N. and Ma, J. (2016). L1 regularized multiplicative iterative path algorithm for non-negative generalized linear models.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(car)
attach(car)
x=as.matrix(car[,1:10])
g1=nnlasso(x,y1,family="binomial")
predict(g1,mode="lambda",at=0.1)
predict(g1,mode="L1norm",at=1)
predict(g1,mode="fraction",at=0.5)
g1=nnlasso(x,y,family="normal")
predict(g1,mode="lambda",at=0.09)
predict(g1,mode="L1norm",at=0.6)
predict(g1,mode="fraction",at=0.8)
detach(car)

nnlasso documentation built on May 2, 2019, 8:19 a.m.