identifiable {cfid} | R Documentation |
Identify a Counterfactual Query
Description
Determine the identifiability of a (conditional) counterfactual conjunction.
Usage
identifiable(
g,
gamma,
delta = NULL,
data = c("interventions", "observations", "both")
)
Arguments
g |
A |
gamma |
An R object that can be coerced into a
|
delta |
An R object that can be coerced into a
|
data |
A |
Details
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).
Value
An object of class query
which is a list
containing
one or more of the following:
-
id
Alogical
value that isTRUE
if the query is identifiable andFALSE
otherwise from the availabledata
ing
. Note that in cases wheregamma
itself is inconsistent, the query will be identifiable, but with probability 0. -
formula
An object of classfunctional
giving the identifying functional of the query in LaTeX syntax viaformat
orprint
, if identifiable. This expression is given in terms of the availabledata
. 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, seeformat.functional()
andformat.probability()
. -
undefined
A logical value that isTRUE
if a conditional conjunctionp(\gamma|\delta)
is undefined, for example whenp(\delta) = 0
, andFALSE
otherwise. -
gamma
The original counterfactual conjunction.. -
delta
The original conditioning counterfactual conjunction. -
data
The original data.
See Also
dag()
, counterfactual_variable()
,
probability()
, functional()
Examples
# 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)