pt_which: A function to figure out which worlds satisfy some query

Description Usage Arguments Examples

Description

The output is a list that contains a matrix of contexts, U, the outcomes associated with them, V, and an indicator for whether the query is satisfied or not in each context, A.

Usage

1
pt_which(model, U = NULL, ops, query, sims = 500)

Arguments

model

A model made using pt_model.

U

A matrix of contexts (worlds). If missing this is generated based on sims.

ops

A set of operations.

query

A query defined on outcomes on observables, V.

sims

Optional number of simulations for draws; defaults to 500 if U not defined.

Examples

1
2
3
4
pt_which(model = pt_model(),
         ops = list(c(0, NA, NA, NA, NA), c(1, NA, NA, NA, NA)),
         query = function(x) (x[[1]][5] == 1) & (x[[2]][5] == 0),
         sims = 3)

macartan/biqq documentation built on May 6, 2019, 6:03 p.m.