The function uses simulation to assess the accuracy when the mean difference is zero, and the type 1 error rates of parametric and non-parametric effect sizes for both two group randomized designs and four group randomized block designs, for each of four different distributions.
calculateNullESAccuracy( mean =0, sd =1, N =10, reps =10, type ="n", seed =123, StdAdj =0, Blockmean =0.5)
Arguments
mean: The mean of the baseline distribution.
sd: The standard deviation or shape of the baseline distribution
N: The number of observations per group for two group experiments and N/2 the sample sizes for four group experiments. N must be even to ensure equal N/2 defines appropriate sample sizes per group for 4 group experiments
reps: The number of replications (i.e. two-group and four group experiments) to be simulated
type: A string parameter defining the distribution being simulated i.e. 'n' for normal data, 'l' for log-normal data, 'g' for gamma data and 'lap' for LaPlace data.
seed: A starting value for the simulations
StdAdj: A numerical parameter that can be used to add additional variance for normal, lognormal and Laplce data and to change the shape parameter for gamma data.
Blockmean: A numerical parameter used to introduce a fixed Block effect for four group experiments
Returns
A tibble identifying the median absolute error for the effect sizes Cliff's d, phat and StdMD and the Type 1 error rate, estimated from the proportion of significant effect sizes in the simulated experiments.