sim_target_from_mediator: Simulate target from mediator

View source: R/sim_mediation.R

sim_target_from_mediatorR Documentation

Simulate target from mediator

Description

This function takes a mediator matrix and simulates downstream outcomes or targets.

Usage

sim_target_from_mediator(M, mediator_effect_size = 0.5, sim_label = "sim_y")

Arguments

M

Vector or matrix of mediator variables. Multiple mediator variables are supported. Names or rownames must match across y and X, and Z and w (if provided).

mediator_effect_size

DEFAULT = 0.5. The proportion of variation in the simulated outcomes explained by the mediator.

Examples

sim_target_from_mediator()

wesleycrouse/bmediatR documentation built on April 28, 2023, 4:01 p.m.