dot-mcee_core_rows: Numerical core implementing MCEE estimation mathematics

.mcee_core_rowsR Documentation

Numerical core implementing MCEE estimation mathematics

Description

Implements the core MCEE estimating equations and sandwich variance estimation. This function contains the mathematical heart of the MCEE method, solving the weighted estimating equations for \alpha (NDEE) and \beta (NIEE).

Usage

.mcee_core_rows(
  n,
  f_nrows,
  omega_nrows,
  i_index,
  phi11_vec,
  phi10_vec,
  phi00_vec
)

Arguments

n

Integer. Number of unique subjects.

f_nrows

Matrix nrows \times p. Row r contains f(t_r)^T, the basis functions evaluated at the decision point for row r.

omega_nrows

Numeric vector of length nrows. Per-row weights \omega(i,t).

i_index

Integer vector of length nrows. Subject index (1 to n) for each row, indicating which subject row r belongs to.

phi11_vec, phi10_vec, phi00_vec

Numeric vectors of length nrows. Influence function values for each row, computed from nuisance predictions.

Details

**MCEE Estimating Equations:**

  • **NDEE**: \alpha = S^{-1} \times (1/n) \sum_{i,t}\omega(i,t)\{\phi_t^{10} - \phi_t^{00}\} f(t)

  • **NIEE**: \beta = S^{-1} \times (1/n) \sum_{i,t}\omega(i,t)\{\phi_t^{11} - \phi_t^{10}\} f(t)

where S = (1/n) \sum_{i,t}\omega(i,t) f(t)f(t)^T.

**Sandwich Variance Formula:** \text{Var}((\alpha,\beta)) = \text{Bread}^{-1} \times \text{Meat} \times \text{Bread}^{-1,T} / n, where:

  • **Bread** = \text{blockdiag}(S, S) (2p \times 2p matrix)

  • **Meat** = (1/n) \sum_i U_i U_i^T, with subject-level score vectors: U_i = \sum_t \omega(i,t) \times [\{\phi_t^{10} - \phi_t^{00} - f^T\alpha\}f ; \{\phi_t^{11} - \phi_t^{10} - f^T\beta\}f]

**Mathematical Details:** The implementation follows the theoretical framework detailed in the MCEE vignette appendix. The estimating equations are based on efficient influence functions for the causal parameters of interest in the mediation analysis setting.

Value

List containing:

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 only

beta_varcov

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


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