
Derived Effects from a Synthesized Path Model
path_effects.RdCompute products of directed coefficients, such as indirect effects, using the joint coefficient covariance across regression equations.
Arguments
- object
A fitted
path_model()object.- paths
Named list of character vectors of directed edges, for example
list(indirect=c("x -> m","m -> y")). A single edge gives a direct effect.- level
Confidence level, strictly between zero and one.
Value
A data frame of estimates, delta-method standard errors, pointwise
normal confidence intervals and p-values, with a vcov attribute.
Details
The gradient of each product is multiplied by the full joint directed-coefficient covariance. This retains uncertainty across equations. Wald intervals are approximations, especially for products near zero; no causal interpretation follows from pooled associations alone. If matched uncertainty is unavailable, estimates are returned with NA inference.
Examples
d <- data.frame(ID=1:5,N=200,m_x=.2,y_x=.3,y_m=.4)
synthesis <- mars(d,studyID="ID",effectID="numID",sample_size="N",
effectsize_type="cor",variable_names=c("m_x","y_x","y_m"),
varcov_type="weighted",estimation_method="FE")
fit <- path_model(synthesis,"m ~ x\ny ~ x+m")
path_effects(fit,list(indirect=c("x -> m","m -> y"),direct="x -> y"))
#> effect estimate std_error ci_lower ci_upper p_value
#> 1 indirect 0.07083333 0.01203498 0.0472452 0.09442147 3.965651e-09
#> 2 direct 0.22916667 0.02805958 0.1741709 0.28416242 3.157690e-16