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).
.mcee_core_rows(
n,
f_nrows,
omega_nrows,
i_index,
phi11_vec,
phi10_vec,
phi00_vec
)List containing:
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\) only
beta_varcovMatrix \(p \times p\): Variance-covariance for \(\beta\) only
Integer. Number of unique subjects.
Matrix \(nrows \times p\). Row r contains \(f(t_r)^T\),
the basis functions evaluated at the decision point for row r.
Numeric vector of length nrows. Per-row weights \(\omega(i,t)\).
Integer vector of length nrows. Subject index (1 to n)
for each row, indicating which subject row r belongs to.
Numeric vectors of length nrows.
Influence function values for each row, computed from nuisance predictions.
**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.