aldvmm.gof {aldvmm}R Documentation

Calculating Goodness of Fit Measures

Description

aldvmm.gof calculates residual- and likelihood-based goodness of fit measures.

Usage

aldvmm.gof(res, par, ll)

Arguments

res

a numeric vector of residuals of all observations in the estimation data.

par

a named numeric vector of parameter estimates.

ll

a numeric value of the log-likelihood.

Details

aldvmm.gof calculates mean squared errors as MSE = \frac{\sum_{i = 1}^{n} (y_{i} - \hat{y}_{i})^2}{n - k}, and mean absolute errors as MAE = \frac{\sum_{i = 1}^{n} y_{i} - \hat{y}_{i}}{n - k}, where y_{i} denotes observed outcomes, \hat{y}_{i} denotes fitted values, n denotes the sample size, and k denotes the number of parameters. The Akaike information criterion is calculated as 2k - 2ll, and the Bayesian information criterion is calculated as k\log(n) - 2ll, where ll denotes the log-likelihood.

Value

aldvmm.gof returns a list including the following objects.

mse

a numeric value of the mean squared error of observed versus fitted outcomes.

mae

a numeric value of the mean absolute error of observed versus fitted outcomes.

ll

a numeric value of the negative log-likelihood.

aic

a numeric value of the Akaike information criterion.

bic

a numeric value of the Bayesian information criterion.


[Package aldvmm version 0.8.8 Index]