Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: k-sample tests for differences in proportions


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: k-sample tests for differences in proportions
Date   Wed, 05 Nov 2003 23:01:00 -0500

At 10:37 PM 11/5/2003 +0900, Joseph Coveney wrote:
How about -glm-? See the do-file below for how. The example is artificial,
but it shows how to use -glm- followed by -test- to do exactly what you want.
If you want to adjust for multiple comparisons, Stata can do that, too. -help
test- Also, just as an aside, consider performing logistic regression
(examining odds ratios, using link(logit)) in lieu of testing differences in
proportions.

Joseph Coveney
Just as a sidelight, I took Joseph's data and ran one of the "right" commands,

xi : logit degreed i.religion

I got a chi-square of 1.86 with 4 d.f., significant at the .7615 level.

Then, I ran a totally inappropriate horribly flawed Anova,

oneway degreed religion, tabulate

and got an F of 0.46 with df = 4, 295, significant at the .7623 level. Fisher's exact test came up with .775.

So, anybody who happened to be using the .7616 level of significance for their decision-making would have badly screwed up here if they'd done it the wrong way. For everyone else, the difference between the right and wrong approaches is virtually non-existent.

Doing the same things with the different data set generated by May's commands, the chi-square was 12.53 with 4 d.f. and the F was 3.19 with df = 4, 295. In both cases the level of significance for the test statistic was .0138. Fisher's Exact test came up with .015.

Given that more than one person has probably mishandled a problem like this, it is nice to know that there is a good chance they reached the right conclusion anyway.

-------------------------------------------
Richard Williams, Associate Professor
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index