MICA-MNI / BrainStat

A statistics and context decoding toolbox for neuroimaging.
https://brainstat.readthedocs.io
Other
87 stars 21 forks source link

MixedEffect doesn't work with numpy array - 'SVD did not converge' #352

Open mtsotras opened 5 days ago

mtsotras commented 5 days ago

term_subject = MixedEffect(demographics.SUB_ID.to_numpy(), 'SUB_ID')

model_mixed = term_age + term_sex + term_age * term_sex + term_subject

slm_mixed = SLM( model_mixed, -contrast_age, surf=pial_combined, mask=mask, correction=["fdr", "rft"], cluster_threshold=0.01, two_tailed=False, ) slm_mixed.fit(thickness)

This code works if you do not convert the series to numpy array.