I would like to simulate significant distributions in R: For that I would like to specify a common M and SD (Group 1 in combined with Group 2), sample size and the effect size (Cohen's d) between two groups and get data that gets significant with a t-test when the effect size is sufficient. Can someone give me some advice on how to do this?
We'll going to assume the same SD in each group and equal sample sizes (if you want to relax these assumptions you'll have to do the algebra yourself!), so pooled SD=within-group SD. Cohen's D is (M2-M1)/SD, or (delta_M/SD), so delta_M = SD*Cohen_D. M1=M-delta_M/2, M2=M+delta_M/2.