I’d like to use Python to perform 2 mixed-effects (random effect) GLM. I see that nilearn has only glm.SecondLevelModel function which, as I understood, uses fixed effects.
Is there any nilearn or Python based solution (best if can deal also with surfaces) you recommend?
fresh out there and potentially very helpful wrt this: Brainstat! It’s a drastically updated version of surfstat and is now also available in python. You can work with surface, volume and parcel-based data and can run uni- and multivariate models which you can define comparably to pymer4 and statsmodels.
Disclaimer: I’m marginally involved in the development.
This typically makes little difference wrt a full fledged mixed-effects model. Why do you say that it implements a fixed effects model ?
Best,
Bertrand
Random effects, true, a bad mistake…
“This typically makes little difference wrt a full fledged mixed-effects model” can you point some references so I can be more confident in this?
I guess that as a last resort (since it would take you off python), you can also use FSL’s GLM. In order to make it work with surfaces, you would need to create a “fake nifti” with the connectome workbench.