simulate_data: Simulate AB SCED data

View source: R/simulate_data.r

simulate_dataR Documentation

Simulate AB SCED data

Description

Simulate data for an AB SCED design using simstudy An arbitrary number of timepoints can be simulated, and an arbitrary true effect size.

Usage

simulate_data(
  participants = 10,
  timepoints_a = 15,
  timepoints_b = 15,
  cohens_d = 1.5
)

Arguments

participants

number of participants to simulate

timepoints_a

number of timepoints to simulate for condition B

cohens_d

the true effect size to simulate. Default of Cohen's d = 1.5, which corrisponds to a Ruscio's A of 0.85. NB this is stated in Cohen's d rather than Hedges' g because g is sample size dependent where d is not.

Examples

# True effect size of Cohen's d = 1.5 / A = 0.85.
# simulate data using these parameters
sim <- simulate_data(participants = 10, timepoints_a = 15, timepoints_b = 15, cohens_d = 1.5)

ianhussey/SCED documentation built on Aug. 25, 2022, 4:42 p.m.