Given a distribution, parameters, sample size, generate a sample.

sim_sample(
  n = 18,
  this_study_error = 0.2,
  rdist = "norm",
  par = list(mean = 20, sd = 0.2),
  control = TRUE,
  effect_ratio = 1.2
)

Arguments

n

sample size

this_study_error

this study error, gamma_k / 2, under the assumption random effect variance is split between two.

rdist

string indicating distribution, "norm", "lnorm", "exp", or "pareto"

par

list of parameter arguments

control

value of first parameter of distribution is determined by median ratio

effect_ratio

ratio of population effects intervention / control

See also

Other simulation Functions that contribute to simulation pipeline.: beta_par(), default_parameters, intervention_proportion(), sim_df(), sim_n()