identifiable {cfid} | R Documentation |
Determine the identifiability of a (conditional) counterfactual conjunction.
identifiable(
g,
gamma,
delta = NULL,
data = c("interventions", "observations", "both")
)
g |
A |
gamma |
An R object that can be coerced into a
|
delta |
An R object that can be coerced into a
|
data |
A |
To identify a non-conditional conjunction P(\gamma)
, the argument
delta
should be NULL
.
To identify a conditional conjunction P(\gamma|\delta)
, both gamma
and delta
should be specified.
First, a parallel worlds graph is constructed based on the query. In a
parallel worlds graph, for each do
-action that appears in \gamma
(and \delta
) a copy of the original graph is created with the new
observational variables attaining their post-interventional values
but sharing the latent variables. This graph is known as a parallel worlds
graph. From the parallel worlds graph, a counterfactual graph
is derived such that each variable is unique, which might not be the case
in a parallel worlds graph.
Finally, the ID* (or IDC*) algorithm is applied to determine identifiability
of the query. Similar to the ID and IDC algorithms for causal effects,
these algorithms exploit the so called c-component factorization to split
the query into smaller subproblems, which are then solved recursively.
If argument data
is "observations"
or "both"
, identification of
interventional probabilities in the resulting functional is further
attempted in terms of the joint probability distribution by using the
ID and IDC algorithms (see causal_effect).
An object of class query
which is a list
containing
one or more of the following:
id
A logical
value that is TRUE
if the query is identifiable and
FALSE
otherwise from the available data
in g
.
Note that in cases where gamma
itself is
inconsistent, the query will be identifiable, but with probability 0.
formula
An object of class functional
giving the identifying
functional of the query in LaTeX syntax via format
or print
,
if identifiable. This expression is given in terms of the
available data
. Variables bound by summation are distinguished by a
superscript asterisk. For tautological statements, the resulting
probability is 1, and for inconsistent statements, the resulting
probability is 0. For formatting options, see
format.functional()
and format.probability()
.
undefined
A logical value that is TRUE
if
a conditional conjunction p(\gamma|\delta)
is undefined,
for example when p(\delta) = 0
, and FALSE
otherwise.
gamma
The original counterfactual conjunction..
delta
The original conditioning counterfactual conjunction.
data
The original data.
dag()
, counterfactual_variable()
,
probability()
, functional()
# Examples that appears in Shpitser and Pearl (2008)
g1 <- dag("X -> W -> Y <- Z <- D X <-> Y")
g2 <- dag("X -> W -> Y <- Z <- D X <-> Y X -> Y")
v1 <- cf("Y", 0, c(X = 0))
v2 <- cf("X", 1)
v3 <- cf("Z", 0, c(D = 0))
v4 <- cf("D", 0)
c1 <- conj(v1)
c2 <- conj(v2, v3, v4)
c3 <- conj(v1, v2, v3, v4)
# Identifiable conditional conjunction
identifiable(g1, c1, c2)
# Identifiable conjunction
identifiable(g1, c3)
# Non-identifiable conjunction
identifiable(g2, c3)