Pearson's chi-squared and Fisher's exact test in Stata®
HTML-код
- Опубликовано: 21 авг 2024
- Explore how to create cross-tabulations of categorical variables and compute Pearson's chi-squared test and Fisher's exact test in Stata using the tabulate command.
Note that you can type db tabulate into the Command window to access its dialog box.
www.stata.com
Copyright 2011-2019 StataCorp LLC. All rights reserved.
In a typical introductory statistics book this test is called Pearson's Chi-Squared Test of Association or sometimes just "Chi-Squared Test". This can be confusing because there are many test statistics that have a chi-squared sampling distribution (such as the Likelihood Ratio Test). In this case, the Pearson Chi-Squared value of 101.42 has two degrees of freedom and the p-value of 0.000 indicates that there is a statistically significant association between race and marital status.
Thank you for posting this. You showed us how to do the test but did not interpret the findings which is really the most important part :/
The chi-squared values in each cell are not tests. They are the contribution of each cell to the chi-squared statistic.
So looking at the output at 1:52 it reads Pearson Chi2(2) = 101.4215 Pr = 0.000
The (2) indicates the degrees of freedom, the 101.42 is the actual chi sq value that is being calculated. So if you were doing this manually you'd look up your tables and under the chi distribution table look at the 2 deg of freedom row. You'll notice that the reading we have is way larger than any of the critical values listed which means we can reject the null even at the 1% confidence interval
My question is: if I run chi2 for individual cells- how do I interpret those numbers? And what tells me which cell is statistically significant? thank you, sylwia
Very helpful indeed.... Thanks a lot
Hi. Could you please tell how to read outcome (chi2) at the bottom in this video. Its confusing from stats books. thnx
That is a good question. I don't think you can say a cell is statistically significant because individual cells have zero degrees of freedom, and without any df, the chi2 statistic doesn't make any sense. I believe Mr. Huber is providing individual chi2 statistics to show the analyst which cells affect the total result the most.
Thank you very much
So helpful! Thank you!!
Cool !!
Very helpful... thank you for the clear explanation
So even using chi2 or exact are the same ? There is a condition that oblige us to choose one of them ?
Thank you too much
I have 2*2 matrix in which one particular cell contains zero frequency. Can I still use the Fisher's exact test?
based on your exemple, The Chi(2) p
Thank you!
Thank you sir
Why are stata videos so dull and not intuitive? The narrator never explains the intuition or how to interpret results? Narration in these videos are equally unhelpful as the stata manual.
I see your point, but I believe this is because they already assume people using the software have a background or fundamental knowledge of statistics. In other words, they are instructional for how to use software, not how to analyze data.
Very helpful indeed.... Thanks a lot