coef.cv.MSTweedie: Extract the estimated coefficients of a cv.MSTweedie object

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function is a wrapper function for the coef.MSTweedie when applied to a cv.MSTweedie object.

Usage

1
2
## S3 method for class 'cv.MSTweedie'
coef(cv, s = c("lambda.1se", "lambda.min"))

Arguments

cv

cv.MSTweedie object

s

Either a vector of regularization parameters (must match those of fit), a vector of indices of regularization parameters. Default is the whole solution path or one of "lambda.min" or "lambda.1se". Default is "lambda.1se".

Details

Returns the estimated coefficient in the MSTweedie object within the cv.MSTweedie object at the specified s values of the regularization parameter. When "lambda.min" or "lambda.1se" is supplied for s, the respective value of the regularization parameter is used.

Value

A list of length ntasks of matrices of dimension nvars*length(s) containing the estimated coefficients at each values of s.

Author(s)

Simon Fontaine, Yi Yang, Bo Fan, Wei Qian and Yuwen Gu.

Maintainer: Simon Fontaine fontaines@dms.umontreal.ca

References

Fontaine, S., Yang, Y., Fan, B., Qian, W. and Gu, Y. (2018). "A Unified Approach to Sparse Tweedie Model with Big Data Applications to Multi-Source Insurance Claim Data Analysis," to be submitted.

See Also

cv.MSTweedie, coef.MSTweedie

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#import package
library(MSTweedie)

#load data
data(AutoClaim)

# performs 10-folds CV with L1/Linf regularization
cv <- cv.MSTweedie(x = AutoClaim, y=1, source=4, reg='Linf')

# extract coefficients at lambda.1se
coef.cv.MSTweedie(cv)

fontaine618/MSTweedie documentation built on May 25, 2019, 5:22 p.m.