getLoglikeMixture {bingat} | R Documentation |
Group Finder
Description
This function takes group splits and determines the likelihood of those groups.
Usage
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 |
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
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)
[Package bingat version 1.3 Index]