Changing Multcompare order of groups

4 Ansichten (letzte 30 Tage)
Ebsa Eshete
Ebsa Eshete am 7 Feb. 2020
Beantwortet: Ebsa Eshete am 9 Feb. 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.

Akzeptierte Antwort

Ebsa Eshete
Ebsa Eshete am 9 Feb. 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])

Weitere Antworten (0)

Kategorien

Mehr zu Analysis of Variance and Covariance finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by