View source: R/R6causal_functions.R
run_experiment | R Documentation |
Conduct a sequence of interventions and collect the simulated data.
run_experiment(scm, intervene, response, n)
scm |
An SCM object |
intervene |
A list where the names of the elements are the variables to be intervened and the values of the elements are vectors specifying the values set in the intervention |
response |
A vector of the names of the response variables |
n |
Size of the data to be simulated for each intervention |
A list containing the values of the response variables for all intervention combinations
backdoor_experiment <- run_experiment(backdoor,
intervene = list(x = c(0,1)),
response = "y",
n = 10000)
colMeans(backdoor_experiment$response_list$y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.