## kernels.fit_tweedie_grid()


Fit a Tweedie GLM to the increments of a cumulative grid.


Usage

``` python
kernels.fit_tweedie_grid(
    grid,
    spec=None,
)
```


`grid` is the dict [kernels.cohort_grid_frame](kernels.cohort_grid_frame.md#ibnr.kernels.cohort_grid_frame) builds (cumulative amounts, one run-off triangle), checked by `kernels.grid.check_grid`. `spec` is a [TweedieSpec](kernels.TweedieSpec.md#ibnr.kernels.TweedieSpec) (its defaults: power 1, log link, origin and development factors, the pattern projection).

Refused, each with [ibnr.errors.Refusal](methods.Refusal.md#ibnr.methods.Refusal): a negative increment at power 1 or above (`negative_increment`); a zero increment at power 2 or above (`zero_increment`); no losses at all, or a design whose terms the observed cells cannot tell apart (`not_identified`); a fit that did not settle within `spec.max_iter` steps (`did_not_converge`); a fit that exists only in the limit, where a log-link fitted mean on an observed cell whose increment is zero or less falls to `BOUNDARY` times the largest increment or the weighted design loses rank while iterating (`degenerate_fit`; at power 0 the message names the ages and origins whose increments sum to zero or less, which the log link cannot fit); an identity-link fitted mean of zero or below, observed or future, at a power above 0, including one that falls to `BOUNDARY` times the largest increment on an observed zero increment, so the verdict does not depend on the units (`negative_fitted_mean`); and an ultimate below zero for an origin whose cumulatives are zero or more (`negative_projection`).
