thomasgladwin / teg_RMA

General framework for organizing data for N-way repeated measures analyses in Matlab (and partly Python), including an implementation of repeated measures ANOVA
GNU General Public License v3.0
1 stars 0 forks source link

Error using teg_RMA_ANOVA>inner #3

Open mara172 opened 6 years ago

mara172 commented 6 years ago

Hi,

I wanted to try the permutation test and got this error:

Error using teg_RMA_ANOVA>inner Too many input arguments.

Error in teg_RMA_ANOVA (line 127) F = inner(X, y_perm, M_red, number_of_dims, Bcoder, nSubj, correct_for_cov, Cont);

Error in teg_RMA (line 192) [F, df1, df2, p, SSM, SSE, MSM, MSE, eta, eps0, bModel] = teg_RMA_ANOVA(M, X0, B, Bcoder, contvec, perm_test, nIts_perm);

I used a model with 2 factors and 3 continuous covariates. Is that to much? Or is another failure?

Many thanks!

mara172 commented 6 years ago

Without the permutationtest it works fine.

thomasgladwin commented 6 years ago

Hi mara,

That was just a bug, sorry! Hadn't used that functionality for a while. I've uploaded a fixed version, and gave it a quick test that seemed to work (as in, giving similar results to the non-permutation tests).

Best wishes,

Thomas

thomasgladwin commented 6 years ago

P.S., although I'm not sure the current version is working correctly with covariates - I'll have a better look at that and get back to you.

mara172 commented 6 years ago

Yes seems to work now! Thanks for the effort to look at the covariates, if you have news about that let me know! Because now with the permutation tests my results are significant ;) would be nice to use this measurements. Thanks for the incredible work and help - makes my life much easier ^^

mara172 commented 6 years ago

I have just two more question - just to the understanding of the algorithm and if I use it in my thesis about the references. Each Influence of the covariate will be calculated independent. So it does not matter if I have 1 or 2 covariates (the results suggests that). I will cite your algorithms with the doi - do you have another article or something that I should cite? Thanks for your help.

thomasgladwin commented 6 years ago

I'll get back as soon as I can, but in the meantime - if it suddenly makes things significant that aren't with the non-parametric analysis, then it's not working properly yet! They should be very similar.

mara172 commented 6 years ago

Hmm ok. The intention to use your algorithm was, that I have a small sample size (25) and thought that I can use the permutation test to overcome the sample size problem. I mean the non-parametric test without permutation shows a similar result as matlabs ranova - so there are marginal significant results. But maybe it is better to just let is like it is ;)

thomasgladwin commented 6 years ago

Hi mara, sorry for the delay, but I finally found the bug in the previous version. The permutation tests seem to be behaving correctly in the current version (which means that the results shouldn't deviate much from the parametric analyses; it's just that there are fewer assumptions which could be useful).

mara172 commented 6 years ago

Hi Thomas, I tried the new version and you are right the results of the non-parametric and permutation test are equal now. Thanks for the effort to correct the analysis! Greetings, Mara