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
22 stars 17 forks source link

mincFDR fails for mincLmer models with summary_type="both" #246

Closed gdevenyi closed 5 years ago

gdevenyi commented 5 years ago

We wanted to examine the random effects in addition to the fixed effects so we adjusted summary_type to provide the extra data.

mincLmerEstimateDF worked, however mincFDR doesn't:

Error in mincFDR.mincLmer(lmermodel1, mask = statsmask) : 
  Mismatch between DF and number of columns
cfhammill commented 5 years ago

Frequentist inference of random effects eh?

The alternative summaries weren't written with mincLmerEstimateDF and friends in mind unfortunately. Estimating dfs for the random effects is something I don't know how to do off hand, so I'd recommend splitting the random effects out from the matrix, and renaming the fixef columns such that it looks like a normal mincLmer output. Then estimateDF and FDR should work. There may be additional massaging needed, but I hope not.

To do inference on the random effects, you can take the t-stats, and do mixture-modelling based FDR on those directly (don't go through p). We might have some code lying around to do mixture of gaussians, I'm also fond of the fdrtool package which uses modified grenander estimators for modelling the alternative distribution.