Learn R Programming

multimedia (version 0.2.0)

treatments,multimedia-method: Names of Treatments in a Multimedia Object

Description

This is a helper that returns the names of the treatment 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 treatment.

Usage

# S4 method for multimedia
treatments(object)

Value

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

Arguments

object

An object of class multimedia.

Examples

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

Run the code above in your browser using DataLab