R/target.R
target_conditional_direct_effect.Rd
The naming convention is a bit different here, because we're actually able to go after the conditional direct effect, well, directly. That is, we can define a loss function whose minimizer defines the conditional mean of the difference between Qbar_a and Qbar_a_star with respect to the joint distribution of M1 and M2 given C and A = a_star. We can then define a submodel through this conditional mean difference (which is exactly the conditional direct effect) and target this quantity directly.
target_conditional_direct_effect( Qbarbar, all_mediator_values, gn, Qbar, Y, A, a, a_star, M1, M2, target_conditional = TRUE, epsilon_threshold = 5, bound_pred = FALSE, universal = TRUE, deps = 1e-05, max_iter = 10000, ... )
Qbarbar | Iterated mean estimates |
---|---|
all_mediator_values | All combinations of M1 and M2 |
gn | Power users may wish to pass in their own properly formatted list of the
propensity score so that
nuisance parameters can be fitted outside of |
Qbar | Outcome regression estimates |
Y | A vector of continuous or binary outcomes. |
A | A vector of binary treatment assignment (assumed to be equal to 0 or 1). |
a | The label for the treatment. The effects estimates returned pertain
to estimation of interventional effects of |
a_star | The label for the treatment. The effects estimates returned pertain
to estimation of interventional effects of |
M1 | A |
M2 | A |
epsilon_threshold | To avoid extreme values of fluctuation parameters (indicating likely numerical instability), we truncate the value this parameter can take. |
bound_pred | Should predictions be bounded? |
max_iter | The maximum number of iterations for the TMLE |