calculateModelSelectionCriteria: Model selection criteria

View source: R/helper_assess.R

calculateModelSelectionCriteriaR Documentation

Model selection criteria

Description

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).

Usage

calculateModelSelectionCriteria(
  .object          = NULL,
  .ms_criterion    = c("all", "aic", "aicc", "aicu", "bic", "fpe", "gm", "hq",
                       "hqc", "mallows_cp"),
  .by_equation     = TRUE, 
  .only_structural = TRUE 
  )

Arguments

.object

An R object of class cSEMResults resulting from a call to csem().

.ms_criterion

Character string. Either a single character string or a vector of character strings naming the model selection criterion to compute. Defaults to "all".

.by_equation

Should the criteria be computed for each structural model equation separately? Defaults to TRUE.

.only_structural

Should the the log-likelihood be based on the structural model? Ignored if .by_equation == TRUE. Defaults to TRUE.

Details

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.

Value

If .by_equation == TRUE a named list of model selection criteria.

References

\insertAllCited

See Also

assess(), cSEMResults


cSEM documentation built on Nov. 25, 2022, 1:05 a.m.