3
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ I suggest that you set aside R for the moment and look up Chi-square testing. You'll see how one can test using different numbers of rows and columns, including 4x2. $\endgroup$ – rolando2 Dec 18 '15 at 22:17
  • 1
    $\begingroup$ And you'll find there is a separate procedure that is standard for situations in which observations are dependent, such as having the same subjects measured in different years. $\endgroup$ – rolando2 Dec 18 '15 at 22:29
  • $\begingroup$ Thanks. However, my aim is not to pool the data and run a Chi-sq with a specific procedure for dependence of observations but to show a pattern over time. Imagine I have 10 or 20 years of data. I want to run a chi-sq every year and then compare the values. The ideal would be to consider different individuals from one year to the other. Does it make sense? $\endgroup$ – emeryville Dec 18 '15 at 22:50
  • $\begingroup$ What you've just described changes the situation a lot: many more rows, and independent as opposed to dependent observations. Maybe you'd like to revise the 'original question' part of your post to fit that? That should get you answers that fit your situation. $\endgroup$ – rolando2 Dec 18 '15 at 22:57
  • 1
    $\begingroup$ Sounds good. Possible new title: "Are multiple Chi-square tests an effective way to show category changes over time?" $\endgroup$ – rolando2 Dec 18 '15 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.