I am fairly new to programming, so forgive me if I give too little information. I have a df which looks like something like this:
Diagnosis | Value | Brainregion |
---|---|---|
NC | 2 | region_a |
NC | 3 | region_b |
BD | 4 | region_a |
BD | 5 | region_b |
I would like to perform a permutation test between same brain regions of different diagnoses (to clarify: mean value of region_a in BD vs mean value of region_a in NC, mean value of region_b in BD vs mean value of region_b in NC and so on).
I would like to use a code that would help me do it in one step for every region.
I tried adapting the method described below, but I can't seem to make it work as intended.
Multiple groups tests via permutation
Can someone please help me?
P.S. I have another version of the same dataframe which looks like this, if it can be more useful:
Diagnosis | Region_a | Region_b |
---|---|---|
NC | 2 | 3 |
BD | 4 | 5 |