I generally don't make use of chi-squared tests, but I thought I would use it as a post-estimation command to see if there is a relationship between two variables in my cross tab.
Thus I do the following:
Where "attrited" is a variable equal to one if respondents had left the sample after wave 1 and zero otherwise, while goodhealth_baseline is a variable equal to 1 if respondent reported good health in the baseline, and zero if respondents reported bad health in the baseline.
Above, I would like to make use of a X2(chi-square) tests for relationships between variables.
The null hypothesis (Ho) is that there is no relationship.
To reject this I need a Pr < 0.05 (at 95% confidence).
The output from this test is as below:
Above, the chi2 is significant because the Pearson chi2 is < 0.05.
Thus I can reject the null hypothesis (Ho) is that there is no relationship between self-rated health and having left the sample.
Therefore I can conclude that there is some relationship between mothers self rated health and having left the sample.
I was happy to take this approach until I thought about the concept of Chi-square a little further, particularly the variables I include.
I can't tell if my data is correct for this type of test, i.e. my understanding is that a chi-square test is used for nominal data, but because I am looking at good health vs, bad health, my data feels more ordinal than nominal, should I thus be using gamma and taub instead (and what would be the best approach to these anyway?) or is my original approach ok?
Any help greatly appreciated,
Very best,
John
Thus I do the following:
Code:
tab attrited goodhealth_baseline if gender == 0, column row nokey chi2 lrchi2 V exact gamma taub
Above, I would like to make use of a X2(chi-square) tests for relationships between variables.
The null hypothesis (Ho) is that there is no relationship.
To reject this I need a Pr < 0.05 (at 95% confidence).
The output from this test is as below:
Code:
| Binary Health attrited | Bad Good | Total -----------+----------------------+---------- 0 | 423 1,371 | 1,794 | 23.58 76.42 | 100.00 | 44.34 60.77 | 55.89 -----------+----------------------+---------- 1 | 531 885 | 1,416 | 37.50 62.50 | 100.00 | 55.66 39.23 | 44.11 -----------+----------------------+---------- Total | 954 2,256 | 3,210 | 29.72 70.28 | 100.00 | 100.00 100.00 | 100.00 Pearson chi2(1) = 73.4293 Pr = 0.000 likelihood-ratio chi2(1) = 73.1591 Pr = 0.000 Cramér's V = -0.1512 gamma = -0.3208 ASE = 0.035 Kendall's tau-b = -0.1512 ASE = 0.018 Fisher's exact = 0.000 1-sided Fisher's exact = 0.000 .
Thus I can reject the null hypothesis (Ho) is that there is no relationship between self-rated health and having left the sample.
Therefore I can conclude that there is some relationship between mothers self rated health and having left the sample.
I was happy to take this approach until I thought about the concept of Chi-square a little further, particularly the variables I include.
I can't tell if my data is correct for this type of test, i.e. my understanding is that a chi-square test is used for nominal data, but because I am looking at good health vs, bad health, my data feels more ordinal than nominal, should I thus be using gamma and taub instead (and what would be the best approach to these anyway?) or is my original approach ok?
Any help greatly appreciated,
Very best,
John
Comment