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

st: returned values for stata survival commands


From   "Richard Palmer-Jones" <[email protected]>
To   <[email protected]>
Subject   st: returned values for stata survival commands
Date   Thu, 20 Oct 2005 08:58:40 +0600

Dear Readers
I do not have access to any manuals here in Dhaka, but it seems that
survival analysis commands in Stata (8.2/9) does not generate any return
values. Is this correct and if so is there any way round this - I am running
the commands for many sets of data?
Thanks

Richard

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Chris Kopp
Sent: Thursday, October 20, 2005 5:53 AM
To: [email protected]
Subject: Re: st: a question on function int

Dear Zhang,

-help datatypes- explains that Stata saves numbers in binary format.  
Numbers less than 1, such as 0.005 in your case, may not have a  
perfect binary representation. So if you type -list if  
temzzz==0.005-, no cases will be displayed. But if you type -list if  
temzzz<0.005-, your case will be listed. This explains what happens  
next: for Stata, the value of temzzz is smaller than 0.005, which  
yields your result. Further references can be foung in -help  
datatypes- as well, but I work away from my manuals at the moment, so  
I can't help you there. I know other users will be able to do much  
better, but it's a first pointer.

Have a nice day, Chris

On Oct 19, 2005, at 22:30, Jian Zhang wrote:

> Hello,
>
> I have a question about the function int that I could not  
> understand what
> stata is doing.  Hope that you can answer me.  Thanks.
>
> Here it is:
>
> For example, I have a data set:
> id
> 10103005
>
> after I run the following commands:
>
> gen double temxxx=(id/1000)
> gen temyyy=int(temxxx)
> gen temzzz=temxxx-temyyy
> gen areaxxx=int(temzzz*1000)
> list id temxxx temyyy temzzz areaxxx
>
> What I got is
> id         temxxx         temyyy    temzzz  areaxxx
> 10103005   10103.005      10103     .005      4
>
> Is variable areaxxx supposed to be 5? Why did stata give me 4  
> instead of
> 5? Any clue for this?
>
> Thanks.
>
> Jian
>
> *
> *   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/


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