R/data-mediation_example.R

#' Example mediation data
#'
#' This data was randomly generated and based off the example data provided in the SAS macro <https://www.hsph.harvard.edu/tyler-vanderweele/tools-and-tutorials/>
#'
#' @format A data table with 250 rows and 5 variables:
#' \describe{
#' \item{x}{Random binary variable (0,1)}
#' \item{m_01}{Random binary variable (0,1)}
#' \item{m}{Random continuous variable (0.006 to 3.158)}
#' \item{y}{Random continuous variable (0 to 1)}
#' \item{c}{Random continuous variable (-1.272 to 3.582)}
#' }
#' @example
#' mediation_example
"mediation_example"
jhcreed/mediator documentation built on Dec. 13, 2020, 12:43 p.m.