bind_mediation | R Documentation |
mediation_data
to a single data.frameIt can be helpful to combine all the data in a mediation_data
S4 object
into a single data.frame. This concatenates all data sources horizontally,
into an N samples x (all outcomes, mediators, treatments, ...) matrix.
bind_mediation(exper)
exper |
An object of class |
A data.frame containing all variables from the original
mediation_data
object.
exper <- demo_joy() |>
mediation_data("PHQ", "treatment", starts_with("ASV"))
exper
bind_mediation(exper)
exper <- demo_spline(tau = c(2, 1)) |>
mediation_data(starts_with("outcome"), "treatment", "mediator")
exper
bind_mediation(exper)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.