Changing Multcompare order of groups

조회 수: 4 (최근 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 CenterFile Exchange에서 Analysis 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