Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: chi2 on aggregate results |

Date |
Tue, 11 May 2010 17:06:03 +0100 |

<sacrifice to majordomo> -----Original Message----- From: Nick Cox Sent: 11 May 2010 17:04 To: 'statalist@hsphsun2.harvard.edu' Subject: RE: st: chi2 on aggregate results Sorry: the second sentence of my previous was nonsense. Stop at "helpful clarification". Nick n.j.cox@durham.ac.uk From: Nick Cox That's a helpful clarification. But note also that the question was about -tabi-, which doesn't allow, I think, any scope for testing the hypothesis of equal proportions. Nick n.j.cox@durham.ac.uk Lachenbruch, Peter Not quite. The null hypothesis for a 2x2 table is either the proportions in rows (cols) are the same or that the rows and columns are independent. We never test if they are different. That would require we specify how they are different. One could set it up that way, but it would be a mess, I fear. And it would have lots of ways to go wrong. If you specified that one row had proportions twice as large as the other, you could get surprised if the proportion in the first row was 0.6. On Behalf Of Nick Cox It's the same test; it's just a question of which way you look at it, in terms of null hypothesis or not, and of how pedantically (carefully) you word it. mai7777 Interesting. So if the tabi test is for the independence of the row & column vars, how can I test that the proportions are statistically different given the sample sizes? On Mon, May 10, 2010 at 1:31 PM, Nick Cox <n.j.cox@durham.ac.uk> wrote: > No; it is not. 47.22 and 76.67 are observed column percents, and not predictions of the hypothesis. > > The hypothesis being tested is that the row and column variables are independent. This may be clearer if you also use the -expected- option of -tabi-. > > Nick > n.j.cox@durham.ac.uk > > mai7777 > > Thanks for the quick response. I guess it was the "col" option that I > was looking for, but just to confirm: Below, is the Pearson chi2(1) = > 5.9421 Pr = testing the hypothesis that the proportion of 76.67 in > a sample size of 30 equal to the proportion of 47.22 in a sample size > of 36? > > > . tabi 23 17 \ 7 19, chi col > | col > row | 1 2 | Total > -----------+----------------------+---------- > 1 | 23 17 | 40 > | 76.67 47.22 | 60.61 > -----------+----------------------+---------- > 2 | 7 19 | 26 > | 23.33 52.78 | 39.39 > -----------+----------------------+---------- > Total | 30 36 | 66 > | 100.00 100.00 | 100.00 > > Pearson chi2(1) = 5.9421 Pr = 0.015 > > > On Mon, May 10, 2010 at 1:15 PM, Alan Neustadtl > <alan.neustadtl@gmail.com> wrote: >> Are you looking for something like this? >> >> - tabi 23 17 \ 7 19, chi col - >> >> >> >> On Mon, May 10, 2010 at 1:08 PM, mai7777 <mai7777@gmail.com> wrote: >>> hi, >>> I'm trying to conduct a chi2 on aggregate results to test that the >>> proportions of incidence across two treatments are the same: >>> >>> Treatment 1 has a total of 30 subjects, 23 of which had incidence >>> Treatment 2 has a total of 36 subjects, 17 of which had incidence. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: chi2 on aggregate results***From:*mai7777 <mai7777@gmail.com>

**Re: st: chi2 on aggregate results***From:*Alan Neustadtl <alan.neustadtl@gmail.com>

**Re: st: chi2 on aggregate results***From:*mai7777 <mai7777@gmail.com>

**RE: st: chi2 on aggregate results***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: chi2 on aggregate results***From:*mai7777 <mai7777@gmail.com>

**RE: st: chi2 on aggregate results***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**RE: st: chi2 on aggregate results***From:*"Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>

**RE: st: chi2 on aggregate results***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**RE: st: chi2 on aggregate results***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**RE: st: chi2 on aggregate results** - Next by Date:
**Re: st: How can I put the numerical values of a variable into a numlist?** - Previous by thread:
**RE: st: chi2 on aggregate results** - Next by thread:
**st: Different results for Fixed and Random Effects models Using STATA and SAS** - Index(es):