Compare a theory with a rival account of the same constructs
Source:R/entailment.R
tf_discriminate.RdSets the causal graph of a theory against that of a rival and lists what
would tell the two apart. rival is the id of one of the theory's
alternatives that states propositions over the theory's constructs,
or a theory object of its own, whose constructs are matched to the theory's
by id. The graphs are compared on the constructs that both graphs contain,
those that some proposition of each, directed or an association, relates to
another construct.
Value
A list with theory_id, rival_id, criterion,
evaluated, reason, shared, only_theory,
only_rival, markov_equivalent, independence_basis,
independencies, effects, associations, claims
and counts.
Details
independencies lists each conditional independence that one graph
implies and the other does not, with the graph that implies it. When the
two graphs name different constructs, each is first projected onto the
shared ones. effects and associations list each pair of shared
constructs whose total effect, or marginal association, takes a different
derived sign under the two graphs, and decisive is TRUE when
both signs are fixed. claims reads every claim of the theory's
predictions and phenomena under both graphs, as tf_entailments() does, and
discriminates is TRUE when one graph entails the claim and the
other contradicts it. markov_equivalent is TRUE when the two
are acyclic graphs of directed relations over the same constructs with the
same skeleton and the same unshielded colliders, in which case no
test of conditional independence separates them, and NA when that
rule does not apply.
A graph with feedback loops is not compared under cycles = "refuse"
(evaluated is FALSE), though the claims are read as
tf_entailments() reads them. Under cycles = "sigma", it is read as
in tf_entailments(), and its independencies are compared only when the two
graphs name the same constructs.
See also
Other causal reading:
tf_entailments(),
tf_equivalent_models()
Examples
t <- tf_read(tf_example_path("modality-switching.theory.yaml"))
d <- tf_discriminate(t, "alt_grounding_by_interaction")
vapply(d$claims, function(x) paste(x$id, x$theory, x$rival), "")
#> [1] "pred1 entailed entailed" "pred3 entailed contradicted"
#> [3] "pred4 entailed entailed" "ph1 entailed contradicted"