Mouse-Imaging-Centre / RMINC

Statistics for MINC volumes: A library to integrate voxel-based statistics for MINC volumes into the R environment. Supports getting and writing of MINC volumes, running voxel-wise linear models, correlations, etc.; correcting for multiple comparisons using the False Discovery Rate, and more. With contributions from Jason Lerch, Chris Hammill, Jim Nikelski and Matthijs van Eede. Some additional information can be found here:
https://mouse-imaging-centre.github.io/RMINC
Other
23 stars 17 forks source link

Feature Request: Post-hoc tests on {minc,anat,vertex}{lm,lmer}? #245

Closed gdevenyi closed 5 years ago

gdevenyi commented 6 years ago

We are now regularly running into the case where we have more than 2 group levels in a given model.

I know I can get a different comparison if I change the reference level and re-run the model, but as I understand it, that is a multiple comparison so the statistical significance is is incorrect. The way I would do this with a regular lm is the multicomp glht function.

cfhammill commented 6 years ago

Not stats::TukeyHSD?

I suppose we could return the vcov matrix for each voxel, but that would be very space inefficient. Is there something holding you back from:

pMincApply(files, function(v, data) glht(lm(v ~ ..., data = data)), data = frame)`
gdevenyi commented 6 years ago

Tukey is probably okay as well? Not sure it can do lmers

gdevenyi commented 6 years ago

Re: holding back, yes, not knowing I can do that :)

cfhammill commented 5 years ago

I don't think I'm going to implement this feature. If another dev is willing and able I'd be happy to coach, but right now most of my energy is going toward building/scaling bayesian approaches. Improving docs so that people are more comfortable writing their own parallelized voxel level code is probably a much better use of time.