marginalGivenIntervention: Get marginal probabilities, given an intervention.

Description Usage Arguments Value See Also

View source: R/query.R

Description

Get the marginal probability of a node, when each other node (separately) has been conditioned upon each of its levels.

Usage

1
2
  marginalGivenIntervention(net, node, dat, FUN = identity,
    ...)

Arguments

net

A BN. A "parental" object.

node

An integer or a name of a column of dat

dat

A data frame, with columns corresponding to the Bayes Net in grain.

FUN

a function that is applied to the output of querygrain. The first argument should accept the result of querygrain FOR A PARTICULAR NODE. (Usaully querygrain returns a list, since it may provide the distribution of a number of nodes at once. Here, we remove that list.) Any other arguments are passed ...

...

Passed to FUN

Value

A list, with a component for each node of the Bayes Net (apart from the node node). Each component is a list, corresponding to the named level. These components contain the result of applying result of applying FUN to the result of querygrain.

See Also

marginalGivenOthers, as.grain, queryFinding


rjbgoudie/structmcmc documentation built on Nov. 3, 2020, 3:41 a.m.