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 15:56:01 +0000
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/