aldvmm.gof
calculates residual- and likelihood-based goodness of fit measures.
aldvmm.gof(res, par, ll)aldvmm.gof
returns a list including the following objects.
msea numeric value of the mean squared error of observed versus fitted outcomes.
maea numeric value of the mean absolute error of observed versus fitted outcomes.
lla numeric value of the negative log-likelihood.
aica numeric value of the Akaike information criterion.
bica numeric value of the Bayesian information criterion.
a numeric vector of residuals of all observations in the estimation data.
a named numeric vector of parameter estimates.
a numeric value of the log-likelihood.
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.