coef.MSTweedie: Extract the extimated coefficients of a MSTweedie object

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

Description

This function extracts the extimated coefficients of a MSTweedie object at given regularization parameters and given sources.

Usage

1
2
## S3 method for class 'MSTweedie'
coef(fit, s = NULL, tasks)

Arguments

fit

MSTweedie object.

s

Either a vector of regularization parameters (must match those of fit) or a vector of indices of regularization parameters. Default is the whole solution path.

tasks

Indices of the sources of which coefficients must be returned. Default is all sources.

Value

A list of length length(tasks) 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

MSTweedie, plot.MSTweedie, predict.MSTweedie

Examples

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

# load data
data(AutoClaim)

# L1/Linf regularization
fit <- MSTweedie(x=AutoClaim, y=1, source=4, reg='Linf')

# extract coefficients at 34th to 36th lambda
coef.MSTweedie(fit, s=34:36)

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