poldracklab / fitlins

Fit Linear Models to BIDS Datasets
https://fitlins.readthedocs.io
Apache License 2.0
76 stars 32 forks source link

Consider pymare for meta-analysis nodes #290

Open effigies opened 3 years ago

effigies commented 3 years ago

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

effigies commented 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.

tyarkoni commented 3 years ago

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.