## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(buzzMed)

## ----example, eval = FALSE----------------------------------------------------
# library(buzzMed)
# 
# # Create some toy data to play with
# my_data <- data.frame(
#     MyPredictor = rnorm(30),
#     MyMediator1 = rnorm(30),
#     MyMediator2 = rnorm(30),
#     MyOutcome = rnorm(30)
# )
# 
# # Specify your mediation model using syntax 'Y ~ M1 + M2 | X'
# model_string <- "MyOutcome ~ MyMediator1 + MyMediator2 | MyPredictor"
# 
# # Run the model with continuous mediator and continuous outcome
# fit <- buzzEBMcontMcontY(model = model_string, dataset = my_data)

