Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: AW: All entries saved as integers


From   Hans Henrik Sievertsen <[email protected]>
To   [email protected]
Subject   Re: st: AW: All entries saved as integers
Date   Thu, 11 Feb 2010 09:53:55 +0100

Thanks,

It was not the display, it actually saved the numbers as integers. Because
if I tried doing something like:
gen a=2.866
gen b=2.9
gen c=a*b
disp b
4

I updated stata (update all)...and then it worked fine...It is still a
mystery what happened, but at least it is working now..
Hans

2010/2/11 Martin Weiss <[email protected]>

>
> <>
>
> Note you can request a specific -format- in the call to -display-:
>
>
>
> *************
> clear
> set obs 10
> gen a=2.73456
> gen z=uniform()
>
> disp %2.0fc a _n %4.3fc z
> *************
>
> Other than that, it is pretty unclear how this problem could arise for you.
> No lister has so far been able to reproduce it.
>
>
>
> HTH
> Martin
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Hans Henrik
> Sievertsen
> Gesendet: Mittwoch, 10. Februar 2010 21:49
> An: [email protected]
> Betreff: st: All entries saved as integers
>
> Hi all,
>
> I suddenly experience that all my entries in stata are saved as integers?
> How can that be?
> If I for instance type:
>
>
> . clear
>
> . set obs 10
> obs was 0, now 10
>
> . gen a=2.73456
>
> . disp a
> 2
>
>
> While if I use some function it works:
>
>
> . gen z=uniform()
> . disp z
> .88350743
>
> What am I doing wrong?
> Thanks in advance!
>
> Regards
> Hans
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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