
Last chance! 50% off unlimited learning
Sale ends in
Direct Effects from Estimated Model
indirect_overall(model, exper = NULL, t1 = 1, t2 = 2)
A data.frame summarizing the overall indirect effects associated with different settings of j in the equation above.
An object of class multimedia containing the estimated mediation and outcome models whose mediation and outcome predictions we want to compare.
An object of class multimedia_data containing the mediation and outcome data from which the direct effects are to be estimated.
The reference level of the treatment to be used when computing the indirect effect.
The alternative level of the treatment to be used when computing the indirect effect.
Estimate direct effects associated with a multimedia model. These estimates are formed using Equation (10) of our preprint.
# example with null data
exper <- demo_joy() |>
mediation_data("PHQ", "treatment", starts_with("ASV"))
fit <- multimedia(exper) |>
estimate(exper)
indirect_overall(fit)
# example with another dataset
exper <- demo_spline(tau = c(2, 1)) |>
mediation_data(starts_with("outcome"), "treatment", "mediator")
fit <- multimedia(exper) |>
estimate(exper)
indirect_overall(fit)
Run the code above in your browser using DataLab