View source: R/mle.kraftMcMillan.r
| mle.kraftMcMillan | R Documentation |
A power analysis of the encoding algorithm using to encode subsets of S in G.
mle.kraftMcMillan(G, k, multiNode = FALSE)
G |
- A character vector of all node names in the background knowledge graph. |
k |
- The size of the node name subsets of G. |
multiNode |
- Boolean, indicating whether to use the multi-node diffusion encoding algorithm (TRUE) or the single-node diffusion encoding algorithm (FALSE). Default is FALSE. |
IA - a list of bitlengths associated with all outcomes in the N choose K outcome space, with the names of the list elements the node names of the encoded nodes
G = list(A=0, B=0, C=0, D=0, E=0, F=0, G=0)
names(G) = tolower(names(G))
adj_mat = rbind(c(0,2,1,0,0,0,0), #A's neighbors
c(2,0,1,0,0,0,0), #B's neighbors
c(1,1,0,1,0,0,0), #C's neighbors
c(0,0,1,0,2,1,0), #D's neighbors
c(0,0,0,2,0,2,1), #E's neighbors
c(0,0,0,1,2,0,1), #F's neighbors
c(0,0,0,0,1,1,0) #G's neighbors
)
rownames(adj_mat) = names(G)
colnames(adj_mat) = names(G)
adjacency_matrix = list(adj_mat)
IA = mle.kraftMcMillian(G, 2)
# Power to find effects is
sum(2^-unlist(IA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.