View source: R/helper_assess.R
calculateModelSelectionCriteria | R Documentation |
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 )
.object |
An R object of class cSEMResults resulting from a call to |
.ms_criterion |
Character string. Either a single character string or a vector
of character strings naming the model selection criterion to compute.
Defaults to |
.by_equation |
Should the criteria be computed for each structural model
equation separately? Defaults to |
.only_structural |
Should the the log-likelihood be based on the
structural model? Ignored if |
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
\insertCiteSharma2019;textualcSEM in the context of PLS. The relevant formula can be found in
Table B1 of the appendix of \insertCiteSharma2019;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 formula are (see, e.g., \insertCiteAkaike1974cSEM,
\insertCiteSchwarz1978;textualcSEM,
\insertCiteHannan1979;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
.
If .by_equation == TRUE
a named list of model selection criteria.
assess()
, cSEMResults
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.