This function performs multiple simulations of two-group balanced experiments for one of four distributions and a specific group size. It identifies the average value of phat, Cliff' d and their variances. It either returns the effect sizes for each non-parametric effect size or it reports the number of times the each non-parametric effect size is assessed to be significantly different from zero. We also present the values for the t-test as a comparison. For log-normal data the results of analysing the transformed data are also reported.
RandomExperimentSimulations( mean, sd, diff, N, reps, type ="n", seed =123, StdAdj =0, alpha =0.05, returnData =FALSE, AlwaysTwoSidedTests =FALSE)
Arguments
mean: The default mean used for both groups (one treatment group and one control group). It can be changed for the treatment group using the parameter diff
sd: This is the default spread for both groups. It must be a real value greater than 0. It can be adjusted for the treatment group using the parameter StdAdj
diff: This is added to the treatment group mean. It can be a real value avd can take the value zero.
N: this is the number of observations in each group. It must be an integer greater than 3.
reps: this identifies the number of times each experiment simulation is replicated.
type: this specifies the underlying distribution used to generate the data. It takes the values 'n' for a normal distribution, 'l' for lognormal distribution,'g' for a gamma distribution, 'lap' for a Laplace distribution.
seed: This specifies the initial seed for the set of replications (default 123).
StdAdj: this specifies the extent of variance instability introduced by the treatment and it must be non-negative but can be 0.
alpha: This specifies the level of significance used for statistical tests (default 0.05).
returnData: If TRUE, the function returns the individual effect sizes and their variances, otherwise it returns summary statistics (default FALSE).
AlwaysTwoSidedTests: If set to FALSE (default) the algorithms uses one-sided tests if diff!=0 and two-sided tests if diff=0. If set to TRUE the algorithm always uses two-sided tests.