Learn R Programming

MetricsWeighted (version 0.1.0)

deviance_normal: Normal deviance

Description

Weighted average of (unscaled) unit normal deviance. This equals the weighted mean-squared error, see e.g. [1].

Usage

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

Arguments

actual

Observed values.

predicted

Predicted values.

w

Optional case weights.

...

Further arguments passed to deviance_tweedie.

Value

A numeric vector of length one.

References

[1] Ohlsson E. and Johansson B. (2015). Non-Life Insurance Pricing with Generalized Linear Models. Springer Nature EN. ISBN 978-3642107900.

See Also

deviance_tweedie, mse.

Examples

Run this code
# NOT RUN {
deviance_normal(1:10, (1:10)^2)
deviance_normal(1:10, (1:10)^2, w = rep(1, 10))
deviance_normal(1:10, (1:10)^2, w = 1:10)

# }

Run the code above in your browser using DataLab