View source: R/mcee_helper_estimation.R
| mcee_helper_stage2_estimate_mcee | R Documentation |
Computes the Natural Direct Excursion Effect (NDEE; \alpha) and Natural Indirect
Excursion Effect (NIEE; \beta) parameters using Stage-1 nuisance predictions.
This is Stage 2 of the two-stage MCEE procedure.
mcee_helper_stage2_estimate_mcee(
data,
id_var,
dp_var,
outcome_var,
treatment_var,
avail_var = NULL,
p1,
p0,
q1,
q0,
eta1,
eta0,
mu1,
mu0,
nu1,
nu0,
omega_nrows,
f_nrows
)
data |
Data frame in long format. |
id_var, dp_var, outcome_var, treatment_var, avail_var |
Character column names. |
p1, p0, q1, q0, eta1, eta0, mu1, mu0, nu1, nu0 |
Numeric vectors of length |
omega_nrows |
Numeric vector of length |
f_nrows |
Numeric matrix with |
**MCEE Estimating Equations:**
The function constructs influence functions \phi_t^{11}, \phi_t^{10}, \phi_t^{00} for each row and
solves the estimating equations:
**NDEE (\alpha)**: \sum_{i,t}\omega(i,t) [\phi_t^{10} - \phi_t^{00}] f(t) = 0
**NIEE (\beta)**: \sum_{i,t}\omega(i,t) [\phi_t^{11} - \phi_t^{10}] f(t) = 0
**Influence Functions:**
- \phi_t^{11}: Direct effect pathway influence function
- \phi_t^{10}: Mediated effect pathway influence function
- \phi_t^{00}: Control/reference pathway influence function
**Variance Estimation:** Uses sandwich variance estimation with subject-level clustering. The variance accounts for the two-stage estimation uncertainty.
List containing MCEE parameter estimates and inference:
alpha_hatVector of length p: NDEE parameter estimates
alpha_seVector of length p: NDEE standard errors
beta_hatVector of length p: NIEE parameter estimates
beta_seVector of length p: NIEE standard errors
varcovMatrix 2p \times 2p: Joint variance-covariance for (\alpha,\beta)
alpha_varcovMatrix p \times p: Variance-covariance for \alpha
beta_varcovMatrix p \times p: Variance-covariance for \beta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.