effective_info: Effective Information

Description Usage Arguments Value Examples

View source: R/effectiveinfo.R

Description

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.

Usage

1
effective_info(tpm, inter = NULL)

Arguments

tpm

Matrix specifying the transition probability matrix.

inter

Vector specifying the intervention distribution.

Value

Numeric giving the effective information.

Examples

 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

rinform documentation built on April 1, 2018, 12:12 p.m.