Dear MNE team,
I would like to perform a 2x2 ANOVA with one between-group variable (Patient vs Control) and one within-group variable (Child vs Adult). I am encountering an issue with assigning my conditions to my data. Here is the code for assignation:
factor_levels = [2, 2]
effects = ['A', 'B', 'A*B']
or ri, r in enumerate(config.group_anova):
for di, d in enumerate(config.age):
if ri == 0 and di == 0:
cidx = 0
else:
cidx = cidx + 1
for si, sid in enumerate(sid_list):
try:
print(f'Processing: {sid}')
evo_in = f'{config.ievo_dir}{sid}_age_{d}_{r}-ave.fif'
tmp = mne.read_evokeds(evo_in)[0].apply_baseline(baseline=bsln).crop(tmin=stat_tmin, tmax=stat_tmax)
tmp.comment = f'{sid} {cnames[cidx]}'
data[cidx][si] = np.transpose(tmp.data)
In my data matrix, I have values of 0 because both factors are being considered as within-group variables (when one is actually a between-group factor). Could you please help me resolve this issue with the assignment of within- and between-group variables? Thank you in advance.
data
...,
[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]],
...,
[[ 2.93491243e-07, 8.77661356e-08, -1.49599865e-07, ...,
-9.20545059e-08, -9.00147917e-07, -5.93777352e-07],
[ 2.24999015e-07, 1.28827063e-08, -1.51916348e-07, ...,
3.63874059e-08, -8.80130666e-07, -6.97680029e-07],
[ 9.78560195e-08, -8.65436198e-08, -1.05204335e-07, ...,
1.74845550e-07, -8.05547142e-07, -7.05786174e-07],
...................................
- MNE version: 0.17.1
- operating system: Windows 11