How do I apply a multiple comparison method to linear mixed effect model results?

38 views (last 30 days)
I have a data file (available for download at http://www.bodowinter.com/tutorial/politeness_data.csv and based upon the research of Winder Grawunder, 2012) that gives conversation voice frequency (Hz) as a function of gender (M/F), attitude (formal/informal register), conversation scenario, e.g. asking a question vs. making a demand, etc., (broken into 7 scenario categories). The data was collected from six different individuals. For each individual, I can store the results in a table, T, having column headers attitude, gender, scenario, and frequency.
If I treat frequency as the numeric response, attitude and gender as fixed categorical effects, and scenario as a categorical random effect, a mixed linear mixed effect model corresponding to this data for each individual is given by
LME = fitlme(T,'frequency~attitude+gender+(1|scenario)');
The command anova(LME), gives me a p-value for each fixed effect, indicating its significance in determining the frequency. However, this p-value varies among the six individuals.
How do I combine all of the data across the six individuals to determine whether a fixed effect, such as gender, is significant in determining the pitch overall?
I realize that this is a multiple comparison problem. Can this be implemented using the multcompare command? If so, what steps are involved, starting from a single file that also accounts for the individuals? (It's stored in a table with column headers, gender, scenario, attitude, frequency, and individual.)
  1 Comment
yuval
yuval on 6 Oct 2018
Shouldn't it be analyzed as a hierarchical linear model? As in scenarios nested in individuals? I wouldn't fit a different model for each individual, rather than add individuals as another level to the model. If you fit a model per person, doesn't gender just represents the intercept?

Sign in to comment.

Answers (2)

dimitris
dimitris on 24 Jan 2017
Run an ANOVA on the LME object (the output of fitlme) eq, anova(LME) It will give you a summary with the F statistics and the corresponding p-values for each fixed factor you included in your GLM.
  2 Comments
Paul
Paul on 31 Aug 2018
Running anova() on output from fitlme() does not produce acceptable output for multcompare().
Pawel81
Pawel81 on 7 Sep 2022
Have you found a solution how to perform the post-hoc tests (alternative for multcompare() ) to the lme results?

Sign in to comment.


Sébastien Puma
Sébastien Puma on 20 Dec 2017
Hello,
I have the exact same question using fitglme function. glme = fitglme (data + pred 1 + pred 2) will provide an output that you can use as input for an Anova : stats = anova (glme).
Yet, multcompare is the only multiple comparisons function I found and does not accept anova' stats as an input.
Since the other anova functions are not valid methods for lme or glme tables, how is it possible to compare groups while using linear mixed effects models ?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!