logLik {gmgm} | R Documentation |
Compute the log-likelihood of a Gaussian mixture model or graphical model
Description
This function computes the log-likelihood of a Gaussian mixture model or graphical model.
Usage
## S3 method for class 'gmm'
logLik(object, data, y = NULL, regul = 0.01, ...)
## S3 method for class 'gmbn'
logLik(object, data, col_seq = NULL, ...)
## S3 method for class 'gmdbn'
logLik(object, data, col_seq = NULL, ...)
Arguments
object |
An object of class |
data |
A data frame containing the data used to compute the
log-likelihood. Its columns must explicitly be named after the variables (or
nodes) of |
y |
A character vector containing the dependent variables if a
conditional log-likelihood is computed. If |
regul |
A positive numeric value corresponding to the regularization
constant if a penalty term is added for Bayesian regularization. If
|
... |
Unused arguments from the generic function. |
col_seq |
A character vector containing the column names of |
Value
If object
is a gmm
object, a numeric value
corresponding to the log-likelihood.
If object
is a gmbn
or gmdbn
object, a list with
elements:
global |
A numeric value corresponding to the global log-likelihood. |
local |
For a |
See Also
Examples
data(gmm_body, data_body)
loglik_1 <- logLik(gmm_body, data_body)
loglik_2 <- logLik(gmm_body, data_body, y = "WAIST")
data(gmbn_body, data_body)
loglik_3 <- logLik(gmbn_body, data_body)
data(gmdbn_air, data_air)
loglik_4 <- logLik(gmdbn_air, data_air, col_seq = "DATE")