-
Notifications
You must be signed in to change notification settings - Fork 2
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
PermutationSchema: terBraak #4
Comments
First method: using CGRWe propose first a method inspired by the CGR-boostrap and the ter-braak permutation method. The CGR bootstrap (doi: 10.1111/1467-9876.00415) also includes a transformation to deal with correlation in the random effects (eg: correlation between random slope and random intercept). For the independant case:
where In the lme4 formula, in correpond for instance to:
where fact is a within subject factor (eg: type of images) and cov is a within-item covariate (eg: age of participant) each random effect is associated to ONE variance parameter (
with variance paramters estimated
For the model with covariance between random effects:
In the lme4 formula, in correpond for instance to:
Here with have only 2 independant random effects.
with covariance matrices estimated
(These steps have already been written in the RGL licensed script, line 71: https://github.com/aloy/lmeresampler/blob/master/R/resamplers.R) We can compute empirical covariances with the rearranged
where N_i corresponds to the number of subjects/items. Then we perform the Cholesky decompostion of the estimated covariance matrices:
We transform
Finally, we compute resamples:
Note that the Finally for BOTH cases we can re-estimate the original model using: Second method: including OLSThe second approach would be to include OLS to take care of the problem of
where Then we would signflipping estimated parameters in the OLS model. However, the We need to discuss with you the problem more in details. |
Very cool write-up. I could follow it nicely. Thanks Jaromil! maybe this is a non-problem due to my lacking math skills ;) I also couldnt follow the whole intuition of the GCR method. I will ask on monday. The principle is clear though. @palday the R package linked above is GPL licensed, is that good enough for you to get inspired from it? @jaromilfrossard what is RGL licensed? lastly: The issue with LSQ is that Z can be overdetermined, @palday, is that what Reinhold uses in his "strange" models? I forgot the syntax. The thing Dave implemented for him PS: as always, sorry if I ask naive things - but if I dont ask them now I will be way behind you guys ;) Edit: Thought about it more and the rePCA probably doesnt solve the problem, because obviously if we back-calculate the rePCA, the resulting random effect predictions are still 0. |
We want to implement terBraak permutation for MixedModels.jl
Problems: How to deal with ranef-variance = 0
see also #3
The text was updated successfully, but these errors were encountered: