pub struct Mediation {
pub outcome_endog: Array1<f64>,
pub outcome_exog: Array2<f64>,
pub mediator_endog: Array1<f64>,
pub mediator_exog: Array2<f64>,
pub exp_pos_outcome: usize,
pub exp_pos_mediator: usize,
pub med_pos_outcome: usize,
}Expand description
Specification of a linear mediation analysis (no formulas).
outcome_endog / outcome_exog define the outcome regression Y ~ X_o
(which must include both the mediator and the exposure as columns), and
mediator_endog / mediator_exog the mediator regression M ~ X_m. The
*_pos fields give the column positions of the exposure in each design and
of the mediator in the outcome design, exactly as in the reference’s
positional API (Mediation(outcome, mediator, [exp_pos_outcome, exp_pos_mediator], med_pos_outcome)).
Fields§
§outcome_endog: Array1<f64>Outcome model response vector.
outcome_exog: Array2<f64>Outcome model design matrix (includes exposure and mediator columns).
mediator_endog: Array1<f64>Mediator model response vector.
mediator_exog: Array2<f64>Mediator model design matrix (includes the exposure column).
exp_pos_outcome: usizeColumn position of the exposure in the outcome design.
exp_pos_mediator: usizeColumn position of the exposure in the mediator design.
med_pos_outcome: usizeColumn position of the mediator in the outcome design.