Deviance computations as used in mfp in stata
deviance_gaussian(rss, weights, n)
A numeric value representing the deviance of a Gaussian model.
residual sum of squares.
numeric vector of weights used in computation of rss
.
number of observations used to compute rss
.
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.