Skip to contents

Function for finding the required sample size

Usage

CalculateSampleSize(
  ss,
  design,
  L,
  K,
  C,
  target = 0.8,
  a = 100,
  eps = 0.001,
  alpha = 0.05,
  modelFilePath = NA
)

Arguments

ss

Vector of sample sizes to check

design

Design priors

L

Monte Carlo samples

K

MCMC Samples

C

Cluster Size

target

Target assurance

a

Dirichlet parameter

eps

Analysis Gamma prior parameters

alpha

Posterior probability

modelFilePath

Relative path to JAGS model file

Value

Minimum sample size for target assurance. Returns target assurance not met for any sample size in ss.