| ParallelWorld | R Documentation | 
R6 Class for parallel world models
R6 Class for parallel world models
Inherits R6 class SCM.
R6causal::SCM -> ParallelWorld
num_worldsNumber of parallel worlds.
worldnamesNames of parallel worlds.
worldsuffixSuffix used for parallel world variables.
originalscmSCM from which the parallel worlds are derived.
dolistList containing the interventions for each world.
R6causal::SCM$add_variable()R6causal::SCM$an()R6causal::SCM$causal.effect()R6causal::SCM$cfid()R6causal::SCM$ch()R6causal::SCM$de()R6causal::SCM$dosearch()R6causal::SCM$intervene()R6causal::SCM$pa()R6causal::SCM$plot()R6causal::SCM$print()R6causal::SCM$remove_variable()R6causal::SCM$simulate()R6causal::SCM$tikz()new()Create a new ParallelWorld object from an SCM object.
ParallelWorld$new(scm, dolist, worldnames = NULL, worldsuffix = "_")
scmAn SCM object.
dolistA list containing the interventions for each world. Each element of the list has the fields:
target: a vector of variable names that specify the target variable(s) of the counterfactual intervention.
ifunction: a list of functions for the counterfactual intervention.
worldnamesA character vector giving the names of the parallel worlds.
worldsuffixA text giving the suffix used for parallel world variables before the world number. Defaults to "_" and the worlds have then suffixes "_1", "_2", "_3", ...
A new 'ParallelWorld' object that also belongs to class 'SCM'.
backdoor_parallel <- ParallelWorld$new(
                        backdoor,
                        dolist=list(
                            list(target = "x", 
                                 ifunction = 0),
                            list(target = list("z","x"), 
                                 ifunction = list(1,0))
                        )
)
backdoor_parallel 
plot(backdoor_parallel)
clone()The objects of this class are cloneable with this method.
ParallelWorld$clone(deep = FALSE)
deepWhether to make a deep clone.
## ------------------------------------------------
## Method `ParallelWorld$new`
## ------------------------------------------------
backdoor_parallel <- ParallelWorld$new(
                        backdoor,
                        dolist=list(
                            list(target = "x", 
                                 ifunction = 0),
                            list(target = list("z","x"), 
                                 ifunction = list(1,0))
                        )
)
backdoor_parallel 
plot(backdoor_parallel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.