-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwosample_sims.py
26 lines (18 loc) · 973 Bytes
/
twosample_sims.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import numpy as np
from simhelper import *
def noeff_twosample(Nsub, T, ndim, K, effect_size=None):
y, z, Z, N = make_labels(Nsub, T, ndim, K)
X = gaussian_data(N, Nsub, K, y, Z, ndim, effect_size=0)
X2 = gaussian_data(N, Nsub, K, y, Z, ndim, effect_size=0)
return X, X2, y, z
def gaussian_twosample(Nsub, T, ndim, K, effect_size=1):
y, z, Z, N = make_labels(Nsub, T, ndim, K)
X = gaussian_data(N, Nsub, K, y, Z, ndim, effect_size=effect_size)
X2 = gaussian_data(N, Nsub, K, y, Z, ndim, effect_size=1.5*effect_size)
return X, X2, y, z
def ballcirc_twosample(Nsub, T, ndim, K, effect_size=1):
y, z, Z, N = make_labels(Nsub, T, ndim, K)
z_persub = z[np.unique(y, return_index=True)[1]]
X = ball_disc_data(z_persub, y, ndim, N, Nsub, effect_size=-.25*effect_size)
X2 = ball_disc_data(z_persub, y, ndim, N, Nsub, effect_size=.75*effect_size)
return X, X2, y, z