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

st: RE: tab


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: tab
Date   Thu, 11 Dec 2003 13:25:04 -0000

I am not sure if I understand this
correctly, but I see two possible issues:

1. Stata holds your numbers in binary,
so apparent small anomalies can often be explained
by the inability to hold certain decimals
exactly.

. search precision

points to relevant FAQs.

2. -tabulate- is reluctant to tabulate classes which
don't exist in the data. In particular, you can't
get zero counts out of -tabulate <myvar>-.

Nick
[email protected]

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Andreas
> Aschbacher
> Sent: 11 December 2003 13:02
> To: [email protected]
> Subject: st: tab
>
>
> I have the following text-file:
>
> 1.549688               <-    I use this value below
> 1.551809
> 1.857859
> 2.032088
> 2.055405
> 2.211566
> 2.36462
> 2.36556
> 2.451005
> 2.464704
> 2.562639
> 2.568022
> 2.575661
> ......                          / always with 5 or 6 places
> behind comma
> /
>
> and I do the following :
>        .gen to_table  = 1.549688  + 0.05*floor((myvar -
> 1.549688 )/0.05)
>        .tab to_table
> in order to count the values in the intervals -
>       first step : 1.549688  + 0.05         -       count value
>   second step: (1.549688  + 0.05) + 0.05   - count value
>   and so on
> why is there no count-value "zero"when there is no value in specific
> interval ?
> I always have 1 at least -
> any helpm will be appreciated very much

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