treatments: Access Treatments

treatmentsR Documentation

Access Treatments

Description

This is an getter method for treatments in an S4 object, usually of class mediation_data.

Usage

treatments(object)

Arguments

object

An object whose treatments slot to modify.

Value

The output depends on the S4 class of the input object. If it is a multimedia model object, it will return a character vector of the outcome variable names. Otherwise it returns the outcome data.

Examples

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

multimedia documentation built on Sept. 30, 2024, 9:28 a.m.