Learn R Programming

MetricsWeighted (version 0.5.4)

deviance_normal: Normal Deviance

Description

Weighted average of (unscaled) unit normal deviance. This equals the weighted mean-squared error, see e.g. the reference below. The smaller the deviance, the better.

Usage

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

Value

A numeric vector of length one.

Arguments

actual

Observed values.

predicted

Predicted values.

w

Optional case weights.

...

Further arguments passed to mse.

References

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

See Also

deviance_tweedie, mse.

Examples

Run this code
deviance_normal(1:10, c(1:9, 12))
deviance_normal(1:10, c(1:9, 12), w = 1:10)

Run the code above in your browser using DataLab