TODO: add the following options:

  1. check conditional MCAR

  2. Test the checks Requires MASS R package

sim_dat(
  N = 100,
  number.groups = 2,
  number.timepoints = 4,
  reg.formula = NULL,
  Beta = 0,
  corr = "ar1",
  cor.value = NULL,
  var.values = 2,
  cond.mcar = F,
  Covariate = F
)

Arguments

reg.formula

this is a regression formula to pass to the data generation; null is formula(~ Group + Time + Time*Group),

Beta

this is the Beta for the regression equation; numeric matrix of Beta values OR a scalar value != 0 that will be the final value of the interaction parameters, default is all(Beta == 0) for Type I error simulations

corr

options for correlation structure c('ind', 'ar1', 'cs'), default is 'ar1'

cor.value

numeric, the first corr in ar1, the corr in cs option

var.values

numeric vector of variances, Default variance value at last timepoint is 2. Can either adjust that last value (rest will be filled in automatically) OR you can pass the full vector

cond.mcar

logical; do you want a conditional MCAR data generation

Covariate

logical; do you want a random simulated covariate?

Value

returns a dataframe containing the simulated data