## Example from the asia dataset from Lauritzen and Spiegelhalter (1988)
## provided by Scutari (2010)
data("mcmc_run_asia")
## Return a named matrix with individual arc support
query(mcmcabn = mcmc.2par.asia)
## What is the probability of LungCancer node being children of the Smoking node?
query(mcmcabn = mcmc.2par.asia, formula = ~LungCancer|Smoking)
## What is the probability of Smoking node being parent of
## both LungCancer and Bronchitis node?
query(mcmcabn = mcmc.2par.asia,
formula = ~ LungCancer|Smoking+Bronchitis|Smoking)
## What is the probability of previous statement, when there
## is no arc from Smoking to Tuberculosis and from Bronchitis to XRay?
query(mcmcabn = mcmc.2par.asia,
formula = ~LungCancer|Smoking + Bronchitis|Smoking -
Tuberculosis|Smoking - XRay|Bronchitis)
Run the code above in your browser using DataLab