getLoglikeMixture: Group Finder

Description Usage Arguments Value Author(s) Examples

View source: R/getLoglikeMixture.R

Description

This function takes group splits and determines the likelihood of those groups.

Usage

1
getLoglikeMixture(data, mixture, numConst)

Arguments

data

A data frame in which the columns (subjects) contain a 0/1 value for row (Node or Edge).

mixture

The output of the getGibbsMixture function.

numConst

The numeric constant to multiply the loglikihood by.

Value

A list containing the BIC criteria and the log likelihood named bic and ll respectively.

Author(s)

Terrence Brooks, Berkley Shands, Skye Buckner-Petty, Patricio S. La Rosa, Elena Deych, William D. Shannon

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
	data(braingraphs)
	
	braingm <- getGibbsMixture(braingraphs, "adjMatrix", 5)
	brainlm <- getLoglikeMixture(braingraphs, braingm)
	brainlm
	
	### By running the loglik mixture over several groups you can find which is the optimal
	## Not run: 
		mixtures <- NULL
		for(i in 1:5){
			tempgm <- getGibbsMixture(braingraphs, "adjMatrix", i)
			mixtures[i] <- getLoglikeMixture(braingraphs, tempgm)$bic
		}
		
		bestgroupnum <- which(min(mixtures) == mixtures)
		bestgroupnum
	
## End(Not run)

bingat documentation built on May 1, 2019, 9:11 p.m.