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

Re: st: Using -bitest- in the same way as -prtest varname, by(groupvar)-


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: Using -bitest- in the same way as -prtest varname, by(groupvar)-
Date   Wed, 11 Aug 2004 00:02:30 -0500

At 11:47 PM 8/10/2004 -0400, Renzo Comolli wrote:
Dear Statlist,

The syntax
. prtest varname, by(groupvar)
allows to test for equality of proportions in two groups (defined by
groupvar).

I would like to do the same test but by using -bitest- which uses the
binomial
Ufortunately the syntax
. bitest varname, by(groupvar)
is not allowed.
Is there any way around it?
Are you concerned that the p-value using -prtest- is not exactly right? Not sure, but I think this will work (if not, somebody please correct me):

tab2 varname groupvar, chi2 exact

The chi-square value will be the square of the z value you get using -prtest-. You will also get Fisher's exact test, which I am assuming is what you want.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
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