Skip to contents

This is a helper that returns the names of the outcome variables in an object of class multimedia. It parses the graph in the DAG specifying the mediation analysis, and it returns all variables of node type outcome.

Usage

# S4 method for class 'multimedia'
outcomes(object)

Arguments

object

An object of class multimedia.

Value

m A vector of strings containing the names of all the outcomes.

Examples

exper <- demo_joy() |>
    mediation_data("PHQ", "treatment", starts_with("ASV"))
multimedia(exper) |>
    outcomes()
#> [1] "PHQ"

exper <- demo_spline(tau = c(2, 1)) |>
    mediation_data(starts_with("outcome"), "treatment", "mediator")
multimedia(exper) |>
    outcomes()
#> [1] "outcome_1" "outcome_2"