Learn R Programming

multimedia (version 0.2.0)

outcomes: Access Outcomes

Description

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

Usage

outcomes(object)

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.

Arguments

object

An object whose outcomes slot to modify.

Examples

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

Run the code above in your browser using DataLab