Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: stset


From   Neophytos Stylianou <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: stset
Date   Tue, 29 Jan 2013 17:02:40 +0000

Nick,

I think you misunderstood me.

I was just wondering if the stset works on both data formats, wide or long, since i did not know in which format my data was in..

I just wanted to know that i am doing the right thing since i am new to survival data.

Sorry for the misunderstanding.

Neo
________________________________________
From: [email protected] [[email protected]] on behalf of Nick Cox [[email protected]]
Sent: 29 January 2013 16:02
To: [email protected]
Subject: Re: st: stset

Manifestly I don't have any information that you have not given us.
You told us that you had a "wide format" which I understand you to
mean that you have several time variables and several survival
variables. If that's wrong and -stset- works, then good, but I am left
wondering why you posted and why you described your data in the way
you did.

Nick

On Tue, Jan 29, 2013 at 3:56 PM, Neophytos Stylianou
<[email protected]> wrote:
> By saying that it won't work do you mean? that the stset command would give me an error?
> Because I am doing it and it does set the data.
>
> In my dataset I have admission as well as discharge/death date per observation
>
> In Statas manual the stset takes the form of:
> stset failuretime, failure(mortality==1) id(id) enter =(admissiontime)
>
> so why it would not work if my dataset as I showed an example earlier has unique observations that have the admission date as well as the discharge/death date?
>
> thanks
> Neo
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
> Sent: 29 January 2013 15:45
> To: [email protected]
> Subject: Re: st: stset
>
> No; that won't work. You don't have a single time variable or survival variable. What makes you think that compatible with -stset-?
>
> You need to -reshape- your data.
>
> Nick
>
> On Tue, Jan 29, 2013 at 3:38 PM, Neophytos Stylianou <[email protected]> wrote:
>
>> I am about to perform some survival analysis and I need to set my dataset in survival data format.
>>
>> Will the stset command work when data is not in the correct format i.e wide instead of long?
>>
>> I have a dataset of many variables (550) and observations (60,000) in this format:
>> Mortality       timeADM timeDisch           ID
>> Survived        Jan2003 Jan2003 1
>> Died                       Feb2004      Mar2004 2
>> Survived        Jun2006 Aug2006 3
>>
>> From what is saw in the stset help file as well as Statas manual this will be ok but I am just worried it is not in the long format.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index