Let me start with an illustration given that my problem is more general (see below).
A simple illustration: I use the Chi-squared test to see if a sample is significantly different from a set of expected values. Assume results of a survey regarding people's favorite colors. 55 persons have been interviewed in 2000 and 2001. Their responses:
- In 2000, 15 for red, 13 for green, 10 for black, 17 for pink.
- In 2001, 20 for red, 13 for green, 5 for black, 17 for pink.
Assuming proportions of 1/4 each, the values of the chi-squared are:
# in 2000: chisq.test(c(15,13,10,17)) X-squared = 1.9455, df = 3, p-value = 0.5838 # in 2001 chisq.test(c(20,13,5,15)) X-squared = 8.8113, df = 3, p-value = 0.03191
Based on the Chi-squared values, can I say that in 2001 the respondents move further away from proportionality? Can we test differences in chi-sq values?
In more general terms: Imagine now I have 20 years of data, not just two years. I want to run a chi-sq every year and then compare the values. Are multiple Chi-square tests an effective way to show category changes over time? Does it make sense to compare the Chi-squared values over time?
Note 1: my aim is not to pool the data and run a Chi-sq with a specific procedure for potential dependence of observations (if the same persons are surveyed over time) but to show a pattern over time based on the chi-sq values.
Note 2: The ideal would be to consider different individuals from one year to the other. Should the sample be composed of the same number of individuals? Or the same individuals?