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 <>
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

I would like to do the same test but by using -bitest- which uses the
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: Richard.A.Williams.5@ND.Edu
WWW (personal):
WWW (department):

* For searches and help try:

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