Multcompare VERY BASIC HELP!!!! - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# Multcompare VERY BASIC HELP!!!!

Posts: 1Member
Hi,

Im new to MatLab (first day!!!) and am trying to use the Multcompare command. This is probably a really basic question but I cant figure it out and its bugging me!!

My data set is basically a 38X12 matrix of numbers with no headings etc.
The rows are 38 countries and the cols are months.
I couldnt figure out how to name the variables as their countries so I did:
Ireland =data(1,;)
England =data(2,;)
etc.
This worked fine.

I basically want to compare every country in my dataset to each other.The multcompare command seemed ideal but I cant work it.

Syntax=
[c,m,h] = multcompare(stats)

How do I compute a 'stats' structure with my data?I got "Undefined function or variable 'stats'." when I tried the command above.
When I tried
[c,m,h]=multcompare(Ireland,England), I got
"??? Error using ==> multcompare at 138
STATS must be a structure."

I can see from the example given:
[p,t,st] = anova1(MPG,Origin,'off');
[c,m,h,nms] = multcompare(st,'display','off');
[nms num2cell(m)]
ans =
'USA' [21.1328] [0.8814]
'Japan' [31.8000] [1.8206]
'Germany' [28.4444] [2.3504]
'France' [23.6667] [4.0711]
'Sweden' [22.5000] [4.9860]
'Italy' [28.0000] [7.0513]

that you can do it using anova1 etc but that data seems to be in a different format.

I want results like they got, for all the combinations of my countires.

Can anyone help me???