Changing Multcompare order of groups

5 vues (au cours des 30 derniers jours)
Ebsa Eshete
Ebsa Eshete le 7 Fév 2020
I have 2 variables, environment and audio. The mult compare lists the audio as High Low Medium, I want it as High Medium Low.
[SurveyEnvironmentLevel, SurveyAudioLevel] = ParsingCategory(file);
response = responseData(:,3);
varnames = {'Audio';'Environment'};
% Switching Audio and Environment causes enviornment to go hi lo hi lo hi lo
[~,b,stats] = anovan(response,{SurveyAudioLevel,SurveyEnvironmentLevel},'model','interaction','varnames',varnames);
[c,m,h] = multcompare(stats,'Dimension',[1 2]);
The SurveyEnvironmentLevel and SurveyAudioLevel are single column arrays.

Réponse acceptée

Ebsa Eshete
Ebsa Eshete le 9 Fév 2020
I figured it out, I had to change the YData attribute in the axes.
ch = h.Children(1).Children(); %children of the axes
% moving 2 to 1
lineHandlesCat2 = ch(3);
lineHandlesCat2Marker = ch(4);
set(lineHandlesCat2,'YData',[1,1])
set(lineHandlesCat2Marker,'YData',[1])
% Moving 1 to 2
lineHandlesCat1 = ch(1);
lineHandlesCat1Marker = ch(2);
set(lineHandlesCat1,'YData',[2,2])
set(lineHandlesCat1Marker,'YData',[2])

Plus de réponses (0)

Catégories

En savoir plus sur Analysis of Variance and Covariance dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by