coef.rcar: Coefficients extraction from "rcar" or "cv.rcar" object

Description Usage Arguments Value Examples

View source: R/coef_rcar.R

Description

This functions extracts coefficients from a "rcar" or "cv.rcar" object at a single value of lambda.

Usage

1
2
## S3 method for class 'rcar'
coef(object, lambd)

Arguments

object:

"rcar" or "cv.rcar" object.

lambd:

Value of the penalty parameter lambda at which coefficients extraction is required. If not specified, the programme use the value of lambda corresponding the minimum mean cross-validated error.

Value

The function returns the retained rules and their corresponding parameters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
vote.rcar.1<-rcar(vote, y.rank = 1, s=0.2, c=0.8,lambd=0.169)
vote.rcar.2<-rcar(vote, y.rank = 1, s=0.2, c=0.8)

coef.rcar(vote.rcar.1)
coef.rcar(vote.rcar.2, lambd = 0.169)


vote.cv<-cv.rcar(vote, y.rank = 1, s=0.2, c=0.8)

coef.rcar(vote.cv, lambd=0.169)
coef.rcar(vote.rcar)
If the value of lambda is not specified, the programme uses the value of lambda corresponding the minimum mean cross-validated error.

azemi/RCAR documentation built on May 7, 2019, 2:54 a.m.