mcee_helper_stage2_estimate_mcee: Stage-2 MCEE parameter estimation given nuisance predictions

View source: R/mcee_helper_estimation.R

mcee_helper_stage2_estimate_mceeR Documentation

Stage-2 MCEE parameter estimation given nuisance predictions

Description

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.

Usage

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
)

Arguments

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 nrow(data) containing Stage-1 nuisance predictions for each row.

omega_nrows

Numeric vector of length nrow(data) containing per-row weights \omega(i,t) \geq 0.

f_nrows

Numeric matrix with nrow(data) rows and p columns containing the basis functions f(t) evaluated at each decision point.

Details

**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.

Value

List containing MCEE parameter estimates and inference:

alpha_hat

Vector of length p: NDEE parameter estimates

alpha_se

Vector of length p: NDEE standard errors

beta_hat

Vector of length p: NIEE parameter estimates

beta_se

Vector of length p: NIEE standard errors

varcov

Matrix 2p \times 2p: Joint variance-covariance for (\alpha,\beta)

alpha_varcov

Matrix p \times p: Variance-covariance for \alpha

beta_varcov

Matrix p \times p: Variance-covariance for \beta


MRTAnalysis documentation built on Sept. 9, 2025, 5:41 p.m.