Description Usage Arguments Value Author(s) Examples
View source: R/getLoglikeMixture.R
This function takes group splits and determines the likelihood of those groups.
1 | getLoglikeMixture(data, mixture, numConst)
|
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. |
A list containing the BIC criteria and the log likelihood named bic and ll respectively.
Terrence Brooks, Berkley Shands, Skye Buckner-Petty, Patricio S. La Rosa, Elena Deych, William D. Shannon
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.