-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple random effects in addition to subject in mixed-effect model #6
Comments
Thanks for the issue! I'm not an expert in EEG so please take my advice with a grain of salt, but I'll link to some references and hopefully I can at least clear up how jlmerclusterperm works.
But more importantly, I want to note that the permutation procedure is not well defined for multiple nested groups, beyond subject and trial. So frankly I'm not sure how the simulating the null should look like when you have something like Site > Electrodes > Subjects. I think that this depends a lot on your research question and what you consider to be a random group. Whatever is the case, I'd recommend that your data follows the constraints set by That being said, here's a suggestion: How about splitting the data by electrode, and within each electrode fit a CPA. So a CPA per electrode where the formula is now reduced to Sorry for the wall of text. The level of complexity for your case is actually beyond what I had in mind for the package (and partly for the CPA procedure itself) but hopefully this gives you some options. Cheers! |
Good to hear you've settle on an approach! As for your question, the package provides a More info in the Tidying Output vignette: https://yjunechoe.github.io/jlmerclusterperm/articles/tidying-output.html |
Thanks, June! |
Great - and no problem! I'll mark this as solved. |
I was trying to build a mixed-effect model related to an intracranial EEG study, thus I have a more complex random effect structure, that is, recording sites nested in electrodes that nested in the subject.
Example model specification: seeg~1+data_beh+(1|chid:elecid:subjinfo)+(1|elecid:subjinfo)+(1|subjinfo)
However, I ran into an error when I tried to specify this complex LME in make_jlmer_spec:
I dug into the make_jlmer_spec function, and found limited random effect specifications such as subject = NULL, trial = NULL,time = NULL.
After removing the random effect of chid and elecid and only keeping the subject random effect, it worked well to run the make_jlmer_spec and clusterpermute.
But meanwhile I got a warning:
My question is, how can I add additional random effects in make_jlmer_spec?
I think this is necessary not only for my intracranial EEG study but also for other studies involving more complex random effects, for example, subjects from different schools, which would additionally involve random effects of schools.
My other question is, how exactly did the permute_timewise_statistics shuffle data? shuffle trial-wise label? or shuffle time-points? and how did it handle random-effect labels? keeping them unchanged?
The text was updated successfully, but these errors were encountered: