MetricsWeighted (version 0.3.0)

deviance_gamma: Gamma Deviance

Description

Weighted average of (unscaled) unit Gamma deviance, see e.g. [1]. Special case of Tweedie deviance with Tweedie parameter 2. The smaller the deviance, the better.

Usage

deviance_gamma(actual, predicted, w = NULL, ...)

Arguments

actual

Strictly positive observed values.

predicted

Strictly positive predicted values.

w

Optional case weights.

...

Further arguments passed to weighted_mean.

Value

A numeric vector of length one.

References

[1] Jorgensen, B. (1997). The Theory of Dispersion Models. Chapman & Hall/CRC. ISBN 978-0412997112.

See Also

deviance_tweedie.

Examples

Run this code
# NOT RUN {
deviance_gamma(1:10, c(1:9, 12))
deviance_gamma(1:10, c(1:9, 12), w = rep(1, 10))
deviance_tweedie(1:10, c(1:9, 12), tweedie_p = 2)
deviance_tweedie(1:10, c(1:9, 12), tweedie_p = 1.99)
deviance_gamma(1:10, c(1:9, 12), w = 1:10)
# }

Run the code above in your browser using DataLab