# Table of means and paired-tests

So I am having a rather simple problem of how to create a table of means in R and post-hoc t-tests.

Data:

DV: Score (Continuous variable)

IV1: Country (Nominal, 3 levels)

IV2: Group (Nominal, 4 levels)

IV3: Condition (Nominal, 2 levels)

I have run an ANOVA with interactions and after removing non-significant interactions, I am left with a model that looks like this.

DV ~ IV1+ IV2+ IV3 + IV1*IV2

IV3 is non significant, but the rest are.

The question I have now is how do I create a table of means split by country and group?

E.g.,

            America         UK            France

Group 1       10.3         9.2              11.4

Group 2       7.8          8.6               2.4

Group 3       4.5          10.7              8.6

Group 4       10.5        10.5               10.6


Secondly how do I then run comparisons to see where the significant interaction is?

I know the pairwise function but I seem to only get that to work for saying comparing the 4 groups, or the 3 countries

pairwise.t.test(Data$$Score, Data$$Country)


As

pairwise.t.test(Data$$Score, Data$$ Country, by = Data\$Group)


Seems to do the exact same