Calculate several information or model selection criteria (MSC) such as the Akaike information criterion (AIC), the Bayesian information criterion (BIC) or the Hannan-Quinn criterion (HQ).
calculateModelSelectionCriteria(
.object = NULL,
.ms_criterion = c("all", "aic", "aicc", "aicu", "bic", "fpe", "gm", "hq",
"hqc", "mallows_cp"),
.by_equation = TRUE,
.only_structural = TRUE
)An R object of class cSEMResults resulting from a call to csem().
Character string. Either a single character string or a vector
of character strings naming the model selection criterion to compute.
Defaults to "all".
Should the criteria be computed for each structural model
equation separately? Defaults to TRUE.
Should the the log-likelihood be based on the
structural model? Ignored if .by_equation == TRUE. Defaults to TRUE.
If .by_equation == TRUE a named list of model selection criteria.
By default, all criteria are calculated (.ms_criterion == "all"). To compute only
a subset of the criteria a vector of criteria may be given.
If .by_equation == TRUE (the default), the criteria are computed for each
structural equation of the model separately, as suggested by
Sharma2019;textualcSEM in the context of PLS. The relevant formula can be found in
Table B1 of the appendix of Sharma2019;textualcSEM.
If .by_equation == FALSE the AIC, the BIC and the HQ for whole model
are calculated. All other criteria are currently ignored in this case!
The relevant formulae are (see, e.g., Akaike1974cSEM,
Schwarz1978;textualcSEM,
Hannan1979;textualcSEM):
$$AIC = - 2*log(L) + 2*k$$ $$BIC = - 2*log(L) + k*ln(n)$$ $$HQ = - 2*log(L) + 2*k*ln(ln(n))$$
where log(L) is the log likelihood function of the multivariate normal distribution of the observable variables, k the (total) number of estimated parameters, and n the sample size.
If .only_structural == TRUE, log(L) is based on the structural model only.
The argument is ignored if .by_equation == TRUE.