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

Re: st: RE: byte mystery


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: RE: byte mystery
Date   Tue, 01 Jun 2004 17:53:14 -0400

Nick Cox wrote:


Can you
. l if !inlist(hadPCI,0,1)
Yep. Gives 2 records (too many vars to show output). But

. l hadPCI if !inlist(hadPCI,0,1)

         +--------+
         | hadPCI |
         |--------|
 471154. |   -128 |
 969426. |   -128 |
         +--------+

And - to reiterate -

. d hadPCI

              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
hadPCI          byte   %9.0g

Thanks,
Jeph










Nick [email protected]
Jeph Herrin



I've been using Stata a long time and never seen this.

. gen byte PCI=(initrs==4|initrs==5|initrs==6)
. gen byte hadPCI=PCI
. tab hadPCI

     hadPCI |      Freq.     Percent        Cum.
------------+-----------------------------------
       -128 |          2        0.00        0.00
          0 |    932,238       91.80       91.80
          1 |     83,218        8.20      100.00
------------+-----------------------------------
      Total |  1,015,458      100.00

Where does that -128 come from?

I am using Stata 8, latest updates, and I have run into this
problem with *three* different byte variables I generate using
this dataset; the only distinctive thing about the dataset is
it's size (>500MB). The problem is difficult to reproduce, as
well, so it's hard to figure out what is going on; for instance,
if I add a line that tabs the first variable (PCI) then there
is no trouble. I did try it without the "byte" designations, and
got the same spurious value.

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