Changing Multcompare order of groups

7 ビュー (過去 30 日間)
Ebsa Eshete
Ebsa Eshete 2020 年 2 月 7 日
回答済み: Ebsa Eshete 2020 年 2 月 9 日
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.

採用された回答

Ebsa Eshete
Ebsa Eshete 2020 年 2 月 9 日
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])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnalysis of Variance and Covariance についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by