Open effigies opened 3 years ago
When constructing the graph, condition on model type:
>>> graph.nodes['subject'].model['type']
"Meta"
If Meta
, use a pymare-based second-level estimator. If GLM
, use nistats SecondLevelModel.
Specifically, for fixed effects models, we probably want to use the WeightedLeastSquares
estimator. For random effects models the choice becomes more complicated, because the computationally efficient RFX estimators implemented in PyMARE (e.g., DerSimonian-Laird) are biased, and the ML/REML estimators can't really be used voxel-wise in any reasonable amount of time. Possibly this could be left to the user to specify, but DerSimonian-Laird is probably still a sane default.
Looks like this is exactly what we want, and should permit covariates, unlike (I believe) our current fixed-effects combination from nilearn: https://github.com/neurostuff/PyMARE/blob/ecc71fa6c469bf49f33e85c0db14a348f7876f68/pymare/estimators/estimators.py#L132-L166