Calculates the Bayesian information criterion (BIC) for a fitted model object for which a log-likelihood value has been obtained.
Numeric, the penalty per parameter to be used;
the default is
The so-called BIC or SBC (Schwarz's Bayesian criterion)
can be computed by calling
AICvlm with a
AICvlm for information and caveats.
Returns a numeric value with the corresponding BIC, or ...,
AICvlm, this code has not been double-checked.
The general applicability of
BIC for the VGLM/VGAM classes
has not been developed fully.
BIC should not be run on some VGAM family
functions because of violation of certain regularity conditions, etc.
Many VGAM family functions such as
cumulative can have the number of
observations absorbed into the prior weights argument
before or after fitting. Almost all VGAM family
functions can have the number of observations defined by
weights argument, e.g., as an observed frequency.
BIC simply uses the number of rows of the model matrix, say,
n, hence the user must be very careful
of this possible error.
Use at your own risk!!
BIC, AIC and other ICs can have have many additive constants added to them. The important thing are the differences since the minimum value corresponds to the best model.
BIC has not been defined for QRR-VGLMs yet.
T. W. Yee.
1 2 3 4 5 6 7 8 9
pneumo <- transform(pneumo, let = log(exposure.time)) (fit1 <- vglm(cbind(normal, mild, severe) ~ let, cumulative(parallel = TRUE, reverse = TRUE), data = pneumo)) coef(fit1, matrix = TRUE) BIC(fit1) (fit2 <- vglm(cbind(normal, mild, severe) ~ let, cumulative(parallel = FALSE, reverse = TRUE), data = pneumo)) coef(fit2, matrix = TRUE) BIC(fit2)
Loading required package: stats4 Loading required package: splines Call: vglm(formula = cbind(normal, mild, severe) ~ let, family = cumulative(parallel = TRUE, reverse = TRUE), data = pneumo) Coefficients: (Intercept):1 (Intercept):2 let -9.676093 -10.581725 2.596807 Degrees of Freedom: 16 Total; 13 Residual Residual deviance: 5.026826 Log-likelihood: -25.09026 logitlink(P[Y>=2]) logitlink(P[Y>=3]) (Intercept) -9.676093 -10.581725 let 2.596807 2.596807  56.41885 Call: vglm(formula = cbind(normal, mild, severe) ~ let, family = cumulative(parallel = FALSE, reverse = TRUE), data = pneumo) Coefficients: (Intercept):1 (Intercept):2 let:1 let:2 -9.593308 -11.104791 2.571300 2.743550 Degrees of Freedom: 16 Total; 12 Residual Residual deviance: 4.884404 Log-likelihood: -25.01905 logitlink(P[Y>=2]) logitlink(P[Y>=3]) (Intercept) -9.593308 -11.10479 let 2.571300 2.74355  58.35587
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.