Last chance! 50% off unlimited learning
Sale ends in
This function computes the Bayesian Information Criterion (BIC) of a Gaussian
mixture model or graphical model:
# S3 method for gmm
BIC(object, data, y = NULL, regul = 0.01, ...)# S3 method for gmbn
BIC(object, data, col_seq = NULL, ...)
# S3 method for gmdbn
BIC(object, data, col_seq = NULL, ...)
If object
is a gmm
object, a numeric value
corresponding to the BIC.
If object
is a gmbn
or gmdbn
object, a list with
elements:
A numeric value corresponding to the global BIC.
For a gmbn
object, a numeric vector containing the local
conditional BICs. For a gmdbn
object, a list of numeric vectors
containing these values for each gmbn
element.
An object of class gmm
, gmbn
or gmdbn
.
A data frame containing the data used to compute the BIC. Its
columns must explicitly be named after the variables (or nodes) of
object
. If object
is a gmm
object, a numeric matrix can
be passed.
A character vector containing the dependent variables if a
conditional BIC is computed. If NULL
(the default), the joint BIC is
computed.
A positive numeric value corresponding to the regularization
constant if a penalty term is added for Bayesian regularization. If
NULL
, no penalty term is added. If a conditional BIC is computed, this
argument is ignored.
Unused arguments from the generic function.
A character vector containing the column names of data
that describe the observation sequence. If NULL
(the default), all the
observations belong to a single sequence. If object
is a temporal
gmbn
or gmdbn
object, the observations of a same sequence must
be ordered such that the object
is a
non-temporal gmbn
object, this argument is ignored.
data(gmm_body, data_body)
bic_1 <- BIC(gmm_body, data_body)
bic_2 <- BIC(gmm_body, data_body, y = "WAIST")
data(gmbn_body, data_body)
bic_3 <- BIC(gmbn_body, data_body)
data(gmdbn_air, data_air)
bic_4 <- BIC(gmdbn_air, data_air, col_seq = "DATE")
Run the code above in your browser using DataLab