| interventionMatrix | R Documentation | 
Calculate interventional distributions from a probability table or matrix of multivariate probability distributions.
interventionMatrix(x, variables, condition, dim = NULL, incols = FALSE)
interventionTable(x, variables, condition)
| x | An array of probabilities. | 
| variables | The margin for the intervention. | 
| condition | The dimensions to be conditioned upon. | 
| dim | Integer vector containing dimensions of variables. Assumed all binary if not specified. | 
| incols | Logical specifying whether not the distributions are stored as the columns in the matrix; assumed to be rows by default. | 
This just divides the joint distribution p(x) by p(v | c), where
v is variables and c is condition.
Under certain causal assumptions this is the interventional distribution
p(x \,|\, do(v)) (i.e. if the direct causes of v are precisely
c.)
intervention.table() is identical to interventionTable().
A numerical array of the same dimension as x.
interventionMatrix(): Interventions in matrix of distributions
Robin Evans
Pearl, J., Causality, 2nd Edition. Cambridge University Press, 2009.
conditionTable, marginTable
set.seed(413)
# matrix of distributions
p = rdirichlet(10, rep(1,16))
interventionMatrix(p, 3, 2)
# take one in an array
ap = array(p[1,], rep(2,4))
interventionTable(ap, 3, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.