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]

st: stset question : how to focus on spell ongoing at a point in calendar time


From   László Sándor <[email protected]>
To   [email protected]
Subject   st: stset question : how to focus on spell ongoing at a point in calendar time
Date   Thu, 19 Jan 2012 20:17:45 -0500

Hi all,

I am using Stata 10 MP for Windows (with varying access to versions 11
and 12 too, so let me know if you have a solution applicable only
there).

I try to check a specific ST problem, but I got confused about how to
set my data.

Basically, I want to check whether hazards jump at a certain month in
calendar time.

But my data spans five years for all individuals, with the supposed
break in the middle for all. Everybody is observed from January 1990
to December 1994, with the break in May 1992. And everybody can have
multiple spells, with origin and failure times specified by dummy
variables. (Entry and exit is given in time.)
I think the following sets up the multispell data correctly:

stset tm, id(pnr) failure(failure) enter(time ym(1990,1)) exit(time
ym(1995,1)) origin(origin==1)

At the moment, I do not care much about multiple spells though, I only
want to keep those ongoing in May 1992. And for them, I would like to
have a variable keeping track of the entry time (though this I can do
my subtracting _t from May 1992.)

What is a nifty way to keep only spells "open" at a certain time?

Many thanks,

Laszlo
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index