computeLoglikeFromPartition {shock}R Documentation

Compute the log-likelihood of the model

Description

This function computes the log-likelihood of a multivariate Gaussian model with a block-diagonal covariance matrix.

Usage

computeLoglikeFromPartition(labels, expdata)

Arguments

labels

vector of block labels for each variable

expdata

matrix of data

Details

This function computes the log-likelihood of a multivariate Gaussian model with a block-diagonal covariance matrix described in the labels vector.

Value

loglike

loglikehood of the model

df

degree of freedom of the model

labels

labels provided as input

Examples

## load data to test
 data(dataTest)
 
## threshold of absS matrix
myLABELS <- thresholdAbsSPath(dataTest)$partitionList

## compute loglikelihood 
logLikePath <- lapply(myLABELS, function(x) computeLoglikeFromPartition(x,dataTest))


[Package shock version 1.0 Index]