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

st: RE: RE: RE: RE: observation about float()


From   VISINTAINER PAUL <VISINT@NYMC.EDU>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: RE: RE: observation about float()
Date   Wed, 25 Sep 2002 16:53:49 -0400

I got it.  Use two variables:  one as a quantile (1 thru 4) and the other
var with the medians for analyses.

Thanks.  I like simple solutions.

-p

-----Original Message-----
From: Nick Cox [mailto:n.j.cox@durham.ac.uk] 
Sent: Wednesday, September 25, 2002 3:19 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: RE: RE: observation about float()

VISINTAINER PAUL

> Thanks, Nick.  Your code with -egen- is simplier.  However, 
> you will get the
> same problem.  The values for "median" in Q1 are 1.4300001 
> and float()
> doesn't recognize this value.
> 
> 	.list if median=float(1.43)
> 	.(no observations)

No; my point was that you don't ever need to do this, 
at least in this territory, and I believe elsewhere. 

Select on the quantile group, which will always be 
an integer, and never on the quantile. 

(Naturally, you actually typed == not = above.) 

Nick 
n.j.cox@durham.ac.uk 

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