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

st: inrange() function


From   "Nick Winter" <[email protected]>
To   <[email protected]>
Subject   st: inrange() function
Date   Tue, 25 Feb 2003 13:58:03 -0500

Greetings,

I just noticed that 

	inrange(a,b,c)

is *not* an exact synonym for the expression

	a>=b & a<=c

when a is missing.  The inrange() expression returns zero whenever a is
missing, so

	inrange(.b,.a,.c)

is 0, not 1 as I would have expected.  Similarly, inrange(.,0,.z) is 0,
and so on...

This seems weird to me . . .

Nick Winter
*
*   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