| BIC.mmlcr {mmlcr} | R Documentation |
This generic function calculates the Bayesian information criterion, also known as Schwarz's Bayesian criterion (SBC), for an mmlcr object for which a log-likelihood value can be obtained, according to the formula -2*log-likelihood + npar*log(nobs), where npar represents the number of parameters and nobs the number of observations in the fitted model.
## S3 method for class 'mmlcr': BIC(object, ...)
object |
a fitted mmlcr object. |
... |
optional fitted model objects. |
if just one object is provided, returns a numeric value with the
corresponding BIC; if more than one object are provided, returns a
data.frame with rows corresponding to the objects and columns
representing the number of parameters in the model (df) and the
BIC.
Schwarz, G. (1978) "Estimating the Dimension of a Model", Annals of Statistics, 6, 461-464.
## Not run: data(mmlcrdf)
## Not run:
mmlcrdf.mmlcr2 <- mmlcr(outer = ~ sex + cov1 | id,
components = list(
list(formula = resp1 ~ 1, class = "cnormonce", min = 0, max = 50),
list(formula = resp2 ~ poly(age, 2) + tcov1, class = "poislong"),
list(formula = resp3 ~ poly(age, 2), class = "multinomlong")
), data = mmlcrdf, n.groups = 2)
## End(Not run)
## Not run: BIC(mmlcrdf.mmlcr2)