learn.trm: Learn a Tweedie regression model parameters

Description Usage Arguments Value Examples

Description

This is an implementation of the maximum likelihood method to estimate the parameters of Tweedie regression model.

Usage

1

Arguments

data

a data frame containing the variables in the model.

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.

pgrid

a numeric vector containing the values among which the power parameter p is chosen in order to maximize the model's log-likelihood. If the power parameter is knonw, pgrid will contain a single value.

Value

This function returns a named list consisting of the Tweedie regression parameters ("p" : the power parameter, "phi": the dispersion parameter, "beta" : the regression coefficients and "glm": a regression object as returned by the glm or lm functions.)

Examples

1
2
3
4
## Not run: 
learn.trm(data, V5~V2 + V3, pgrid=seq(2,3,0.05))

## End(Not run)

km20/tbn documentation built on May 29, 2019, 11:44 a.m.