plot.MSTweedie: Plot the solution path of a MSTweedie object

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

Description

This function produces coefficient profile plot(s) along the sequence of regularization parameters of a MSTweedie object.

Usage

1
2
3
## S3 method for class 'MSTweedie'
plot(x, log.lambda = TRUE, type.coef = c("coef", "norm"),
      lambda.min = NA, lambda.1se = NA, ...)

Arguments

x

MSTweedie object.

log.lambda

Logical flag: whether to plot against the logarithm of the regularization parameters (default) or against the reg. parameters.

type.coef

Whether to plot the coefficients in each source ("coef") or to plot the norm across all sources ("norm"), where the norm is given by x$reg.

lambda.min

If supplied, this traces a vertical line at lambda.min (given by CV.)

lambda.1se

If supplied, this traces a vertical line at lambda.1se (given by CV.)

...

Additionnal parameters passed to plot.

Value

Plot(s) are produced.

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, coef.MSTweedie

Examples

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

# load data
data(AutoClaim)

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

# plot solution path of the norm of the coefficients
plot.MSTweedie(fit, type.coef='norm')

# plot solution path of the the coefficients
par(mfrow=c(2,1))
plot.MSTweedie(fit, type.coef='coef')

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