This simulates one of four data distributions (normal, log-normal, gamma and Laplace), and finds the values of phat and Cliffs d and their variances. It assumes equal group sizes. It returns values of the effect sizes and their variance for a simulated randomized experiment with two treatments. It returns whether or not each non-parametric effect size was significant. It also returns the parametric (standardized and unstandardized) Effect Size and the whether the t-test was significant.
simulateRandomizedDesignEffectSizes( mean, sd, diff, N, type ="n", StdAdj =0, alpha =0.05, AlwaysTwoSidedTests =FALSE, Return.Data =FALSE)
Arguments
mean: The mean used for one of the treatment groups (this is the rate for the gamma data)
sd: The spread used for both treatment groups. It mus be a real value greater than 0 (this is the shape for the gamma data).
diff: This is added to the parameter mean, to define the mean of the other treatment group. 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.
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.
StdAdj: this specifies the extent of variance instability to be introduced.
alpha: the level for all statistical tests (default 0.05)
AlwaysTwoSidedTests: if set to FALSE (i.e. default) the algorithms uses one-sided tests if diff!=0 and two-sided tests otherwise. If set to TRUE the algorithm always uses two-sided tests.
Return.Data: if set to true the algorithm returns the data not the effect sizes (default FALSE).
Returns
data frame incl. the non-parametric and parametric effect sizes and whether the effect sizes are significant at the specified alpha level. For log-normal data the function returns the effect sizes for the transformed data.