Cross Validated
2023-07-24 13:12 UTC
By z8080
AI-113-20230724-social-media-a6fca371
Posthoc pairwise test on the output of a linear mixed-model (MATLAB or R/Python)
I have observations from three groups of participants (A, B, C), that each represent ratings on three different measures (measure 1, 2, and 3). I would like to know if it is the case that, regardless of group, the distance between measure 3 and measure 2 is greater than the distance between measure 3 and measure 1. In STATISTICA, I'd have defined a mixed-model ANOVA with group as between subjects factor and "measure" as a repeated measures factor, defined an appropriate contrast, and then run a significance test on that contrast. I would now like to answer that question not in a GUI-based software like STATISTICA, but instead based on a posthoc pairwise test done on the output of a linear mixed model, conducted in MATLAB. However, after reading the documentation for fitlme and multcomp , I am left confused as to how to go about answering my question. I also don't really remember how that contrast vector should have been defined in STATISTICA, assuming something like this will be needed in the LMM also. An answer that replaces MATLAB with Python or R will be fine, as it should be easy for me to translate between them.
I have observations from three groups of participants (A, B, C), that each represent ratings on three different measures (measure 1, 2, and 3). I would like to know if it is the case that, regardless of group, the distance between measure 3 and measure 2 is greater than the distance between measure 3 and measure 1. In STATISTICA, I'd have defined a mixed-model ANOVA with group as between subjects factor and "measure" as a repeated measures factor, defined an appropriate contrast, and then run a significance test on that contrast. I would now like to answer that question not in a GUI-based software like STATISTICA, but instead based on a posthoc pairwise test done on the output of a linear mixed model, conducted in MATLAB. However, after reading the documentation for fitlme and multcomp , I am left confused as to how to go about answering my question. I also don't really remember how that contrast vector should have been defined in STATISTICA, assuming something like this will be needed in the LMM also. An answer that replaces MATLAB with Python or R will be fine, as it should be easy for me to translate between them.
Full article content could not be extracted automatically. Read the original below.
Source:
Cross Validated
· stats.stackexchange.com