.mcee_core_rows | R Documentation |
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
)
n |
Integer. Number of unique subjects. |
f_nrows |
Matrix |
omega_nrows |
Numeric vector of length |
i_index |
Integer vector of length |
phi11_vec , phi10_vec , phi00_vec |
Numeric vectors of length |
**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.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.