1
$\begingroup$

I need to compare two groups of participants to each other in a model that contains fixed and random effects in R. It was suggested to me that a non-parametric test might be ideal for these comparisons. Here is the data:

structure(list(item = c("'accordion_1'", "'accordion_3'", "'apple_01'", 
"'apple_03'", "'asian_01'", "'asian_02'"), avg = c(3.177631579, 
2.868421053, 4.421052632, 4.526315789, 4.440789474, 4.0625), 
    subcat = c("c", "c", "g", "g", "h", "h"), cat = c(1L, 1L, 
    2L, 2L, 2L, 2L), group_num = c(1L, 1L, 1L, 1L, 1L, 1L), group_name = c("adu", 
    "adu", "adu", "adu", "adu", "adu")), row.names = c(NA, 6L
), class = "data.frame")

I have scoured the internet for code to accomplish this (I am new to both these methods). I initially started by using perm.lmer() in the permutes package with this code:

asd_kid_mod <- perm.lmer(avg ~ group_name * cat + (1|item), 
    data = asd_kid, nperm = 1000, type = "anova")

but it returned p values at 0 which seems strange to me. I also am not sure if mean permutation testing would simply be more appropriate for my data. So I guess my questions are:

  1. What is the best method for permutation testing for LMMs in R?
  2. Would it make more sense to use mean permutation testing?

EDIT: Here is my output form summary:

         Factor df       LRT          F  p
1    (Intercept)  1 555.54630 253.445582 NA
2     group_name  1  29.48206   1.643257  0
3            cat  1 220.76503  24.153896  0
4 group_name:cat  1  64.43601   4.027463  0

and here's a link to what I mean by mean permutation testing: https://towardsdatascience.com/how-to-use-permutation-tests-bacc79f45749

I believe it would be using means instead of medians based on the link above

$\endgroup$
1
  • $\begingroup$ Why do you want to use permutation testing to compare the two groups? As is, the question doesn't make it clear what data you have and what question you are trying to answer (just that you want to use a permutation test to do it). I would start by providing this context first. $\endgroup$
    – dipetkov
    Commented Sep 24, 2023 at 15:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.