simulate_data: Simulate data set

Description Usage Arguments Value

View source: R/sensitivity_functions.R

Description

Simulate data set

Usage

1
simulate_data(n, u_ei, am_intx, yu_strength, mu_strength, params = NULL)

Arguments

n

Number of observations to simulate

u_ei

0/1 flag for whether U should be exposure-induced

am_intx

0/1 flag for A*M interaction in outcome model

yu_strength

Log-OR of U in outcome model

mu_strength

Log-OR of U in mediator model

params

(Optional) List of data-generating parameters see return_dgp_parameters for details on structure

Value

List containing: df (data frame with n rows), outcomes (named list of m and y outcomes), and designs (named list of design matrices for u, m, and y regression models)


lcomm/rstanmed documentation built on Dec. 6, 2020, 9:11 a.m.