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 (sum(y - yhat)^2)/(n - k), and mean absolute errors as sum(y - yhat)/(n - k), where y denotes observed outcomes, yhat denotes fitted values, n denotes the sample size, and k denotes the number of parameters. The Akaike information criterion is calculated as 2*k - 2*ll, and the Bayesian information criterion is calculated as k*log(n) - 2*ll, 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.4 Index]