metasims: metasims

Usage Arguments

View source: R/metasims.R

Usage

1
2
3
4
5
6
metasims(single_study = FALSE, measure = "median",
  measure_spread = "iqr", distributions = default_parameters,
  k = c(3, 7, 10), tau_sq_true = seq(from = 0, to = 0.4, by = 0.2),
  unequal_effect_ratio = 1.2, min_n = 20, max_n = 200, prop = 0.5,
  prop_error = 0.1, trials = 3, trial_fn = metatrial, beep = FALSE,
  knha = TRUE, progress = TRUE)

Arguments

single_study

Set this to TRUE for a simulation of single samples; i.e., one control and one intervention group.

measure

Calculate sample median or mean. Defaults to median.

measure_spread

Specify "iqr", "range", "sd", "var". Will have to check how many of these are done right now.

distributions

a dataframe with a dist column of R distributions, i.e., norm, exp, pareto, and a list-column par of parameter sets. Defaults to default_parmetres

k

Vector of desired numbers studies to simulate for.

tau_sq_true

Variance γ_k \sim N(0, τ^2) associated with the random effect

unequal_effect_ratio

ν_I / ν_C := ρ where ρ = 1 and whatever arguments passed to this. Defaults to 1.2, so that the cases ρ = 1, 1.2 are considered.

min_n

lower bound for sample sizes, defaults to 20

max_n

upper bound for sample sizes, defaults to 200

prop

proportion of n we expect

prop_error

what do we expect 90

\item

beepTurn on beep alert when successfully finished.

\item

progressTurn progress bar on and off.

\item

single_studyWhen set to TRUE, will override simulation parameters with k = 1 and tau_sq_true = 0.

\item

kSimulate for different numbers of studies.

coverage probability simulations of an estimator for various


softloud/metasim documentation built on July 15, 2019, 8:02 p.m.