Learn R Programming

multimedia (version 0.2.0)

mediators: Access Class-Specific Mediators

Description

This is a shorthand for accessing mediator-related slots in classes exported by the multimedia package.

Usage

mediators(object)

Value

The output will depend on the class of the object that is passed in. For multimedia objects, this returns a character vector of mediators. For mediation data objects, this returns the mediator mediator data.

Arguments

object

An object whose mediators we want to access (either their names or values).

Examples

Run this code
exper <- demo_joy() |>
    mediation_data("PHQ", "treatment", starts_with("ASV"))
mediators(exper)

Run the code above in your browser using DataLab