AIC {gmgm}R Documentation

Compute the Akaike Information Criterion (AIC) of a Gaussian mixture model or graphical model

Description

This function computes the Akaike Information Criterion (AIC) of a Gaussian mixture model or graphical model:

AIC = logLik - n_{par}

where logLik is the log-likelihood and n_{par} the number of free parameters.

Usage

## S3 method for class 'gmm'
AIC(object, data, y = NULL, regul = 0.01, ...)

## S3 method for class 'gmbn'
AIC(object, data, col_seq = NULL, ...)

## S3 method for class 'gmdbn'
AIC(object, data, col_seq = NULL, ...)

Arguments

object

An object of class gmm, gmbn or gmdbn.

data

A data frame containing the data used to compute the AIC. 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.

y

A character vector containing the dependent variables if a conditional AIC is computed. If NULL (the default), the joint AIC is computed.

regul

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 AIC is computed, this argument is ignored.

...

Unused arguments from the generic function.

col_seq

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 tth one is related to time slice t (note that the sequences can have different lengths). If object is a non-temporal gmbn object, this argument is ignored.

Value

If object is a gmm object, a numeric value corresponding to the AIC.

If object is a gmbn or gmdbn object, a list with elements:

global

A numeric value corresponding to the global AIC.

local

For a gmbn object, a numeric vector containing the local conditional AICs. For a gmdbn object, a list of numeric vectors containing these values for each gmbn element.

See Also

BIC, logLik

Examples

data(gmm_body, data_body)
aic_1 <- AIC(gmm_body, data_body)
aic_2 <- AIC(gmm_body, data_body, y = "WAIST")

data(gmbn_body, data_body)
aic_3 <- AIC(gmbn_body, data_body)

data(gmdbn_air, data_air)
aic_4 <- AIC(gmdbn_air, data_air, col_seq = "DATE")


[Package gmgm version 1.1.2 Index]