For a university course, a friend of mine had to test whether there is a relation between two ordinal variables. These variables were opinion about the European Union (positive, neutral, negative) and whether people felt being (a) citizen of their country, (b) primarily citizen of their country, but also European, (c) primarily European, but also citizen of their country and (d) European. The data is available in form of a contingency table.
Now, what my friend did was to calculate a chi-squared test. I believe this is wrong, because it does not consider the fact that the groups are ordered, i.e. the variables are ordinal and not categorial. However, chi-squared test seems to be common for this kind of analysis (e.g. here).
In my opinion, the idea behind this question is whether or not there is a significant correlation between those variables, and since Pearson’s correlation cannot be calculated from ordinal data, Spearman’s Rho should be used. An alternative to that would be Goodman’s/Kruskal’s Gamma test, as suggested here. Perhaps the Kruskal Wallis test would also be an option? But can it be used in this setting?
So, my first question is: Is it valid to use the chi-squared test here? What do you think of the alternatives I described?
Question two: How can the significance of Spearman’s correlation be calculated in R? It seems to me most commands reqire observations, not contingency tables, as input.