Computes the average causal effect (ACE) of a given treatment variable X on a given
outcome Y for the models generated by simulateWitnessModel
. This assumes
the synthetic models are small enough, as adjustment is done by brute force calculation.
1  synthetizeCausalEffect(problem)

problem 
a 
The algorithm implemented is a naive one. When creating the cfx
object, field num_v_max
must be
large enough so that the joint distribution is computed in advance. Only for relatively small models (approximately 20
variables in total) this will be feasible.
A list containing three different types of estimand:

the true ACE. 

the result of a naive adjustment using all of the observed covariates. 

the result of a naive adjustment using no covariates. 
1 2 3 4 5 6 7 8 9 10  ## Generate a synthetic problem
problem < simulateWitnessModel(p = 4, q = 4, par_max = 3, M = 1000)
## Idealized case: suppose we know the true distribution,
## get "exact" ACE estimands for different adjustment sets
sol_pop < covsearch(problem, pop_solve = TRUE)
effect_pop < synthetizeCausalEffect(problem)
cat(sprintf(
"ACE (true) = %1.2f\nACE (adjusting for all) = %1.2f\nACE (adjusting for nothing) = %1.2f\n",
effect_pop$effect_real, effect_pop$effect_naive, effect_pop$effect_naive2))

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.