deviance_gaussian: Deviance computations as used in mfp in stata

View source: R/model_metrics.R

deviance_gaussianR Documentation

Deviance computations as used in mfp in stata

Description

Deviance computations as used in mfp in stata

Usage

deviance_gaussian(rss, weights, n)

Arguments

rss

residual sum of squares.

weights

numeric vector of weights used in computation of rss.

n

number of observations used to compute rss.

Details

Note that this is not the usual formula of deviance used in R, but uses the formula found here https://www.stata.com/manuals/rfp.pdf.

It can be applied for normal error models, but should not be used for other kinds of glms.

Value

A numeric value representing the deviance of a Gaussian model.


mfp2 documentation built on Nov. 15, 2023, 1:06 a.m.