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

Re: st: RE: Probable bug in -ci-


From   khigbee@stata.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Probable bug in -ci-
Date   Mon, 10 May 2004 15:44:57 -0500

Fred Wolfe <fwolfe@arthritis-research.org> reported a problem
with -by ...:  ci- when both -exposure()- and -total- were
specified.  Nick Cox <n.j.cox@durham.ac.uk> correctly pinpointed
the code in -ci- causing the problem.

> I think Fred is correct. At first glance, the 
> problem lies in the code 
> 
> 	if _by() & _bylastcall() & "`total'"!="" {
> 		di _n in gr _dup(79) "_" _n "-> Total"
> 		if "`level'"!="" {
> 			local level "level(`level')"
> 		}
> 		if "`exposur'"!="" {
> 			local exposur "exposure(`exposur')"
> 		}
> 		ci `varlist' if `alluse' `weight', /*
> 			*/ `level' `poisson' `binomia' `exposur'
> 		return clear
> 		ret add
> 	}
> 
> in which the lines 
> 
> 	if "`exposur'"!="" {
> 			local exposur "exposure(`exposur')"
> 	}
> 
> have the effect (in his case) of converting the option 
> call internally to 
> 
> 	exposure(ex(duration)) 
> 
> The error message doesn't really point in the right 
> direction here. 

A fix for -ci- will appear in one of the upcoming ado updates.

Ken Higbee    khigbee@stata.com
StataCorp     1-800-STATAPC

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index