Learn R Programming

shock (version 1.0)

computeLoglikeFromPartition: 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

Value

  • loglikeloglikehood of the model
  • dfdegree of freedom of the model
  • labelslabels provided as input

Details

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

Examples

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

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

Run the code above in your browser using DataLab