hyemin-han / BayesFactorFMRI_TWOT

Two-group t-test based on BayesFactorFMRI
MIT License
0 stars 0 forks source link

what about mixed effect analysis? #1

Open vogab opened 1 year ago

vogab commented 1 year ago

Hello, Great package! I was wondering if it is possible to run mixed effects analyses too?

hyemin-han commented 1 year ago

Unfortunately, no. It would be possible to implement GLM with other R commands, e.g., generalTestBF (in BayesFactor) or brm (in brms). However, I am not sure whether they would work as you intended. Also, determining which priors shall be used will also be an issue. At this point, the prior adjustment is only applicable simple comparison tests, e.g., t-tests. So, the GLM stuff should be further developed and tested.

If you are willing to do so, I can give a shot, but it will take a significant amount of my time. So, there should be additional arrangements, e.g., co-authorship, etc. Also, there is no guarantee that the newly implemented functionality will perform as intended because there have not been sufficient relevant prior studies.

vogab commented 1 year ago

Or, maybe it could be performed with the summary statistics approach used in SPM and FSL (without starting from 1st level GLM)? For example, as far as I understand, in FSL you need to input an image of the voxelwise within subject variance and the DOFs (on top of the parameter estimates) to perform mixed effects 2nd level analysis. I don't know whether this functionality would be easy to add if done in this way?

PS: discovering that you authored a paper on bayesian analysis with SPM, I am wondering if you know whether they offer a mixed effect bayesian analysis functionality? in your paper/tutorial, I think it was a fixed effects analysis, or?

hyemin-han commented 1 year ago

In fact that is a good point. Given SPM is capable of 2nd-lv GLM in general, you may try GLM with Bayesian estimation. The only thing that you need to do is setting Bayesian stuff in the estimation unit. One benefit of the method is that you do not need to concern about prior adjustment. Of course, you will have to decide which threshold values (e.g, BF/PPM threshold value) to employ to determine the degree of sensitivity vs. selectivity in your analysis.