Description Usage Arguments Value Examples
View source: R/effectiveinfo.R
Compute the effective information from an n by n transition probability
matrix tpm
given an intervention distribution inter
.
If inter
is NULL
, then the uniform distribution over the n
states is used.
1 | effective_info(tpm, inter = NULL)
|
tpm |
Matrix specifying the transition probability matrix. |
inter |
Vector specifying the intervention distribution. |
Numeric giving the effective information.
1 2 3 4 5 6 7 8 9 10 11 | # Compute effective information on a 3 by 3 tpm with uniform interventionn
tpm <- matrix(0, nrow = 3, ncol = 3)
tpm[, 1] <- c(1.0 / 3, 1.0 / 3, 1.0 / 3)
tpm[, 2] <- c(0.250, 0.750, 0.000)
tpm[, 3] <- c(0.125, 0.500, 0.375)
inter <- c(0.300, 0.250, 0.450)
effective_info(tpm, NULL) # 0.202701
# .. and with a non-uniform intervention
inter <- c(0.300, 0.250, 0.450)
effective_info(tpm, inter) # 0.1724976
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.