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: declaring a person period dataset and fitting discrete-time survival models with st and MI
From
Clara Barata <[email protected]>
To
[email protected]
Subject
st: declaring a person period dataset and fitting discrete-time survival models with st and MI
Date
Thu, 5 Aug 2010 09:08:24 -0400
Hi!
I am trying to fit some survival analysis models to a person period
dataset using stata/mp 11. My ultimate goal is to be able to use MI
for data imputation, then analyze the data using mi estimate: together
with a survival analysis command. My two questions are the following:
1) How do i declare the data to be person-period with multiple
dummies for time? stset seems to require the specification of just one
time variable. Should I just use _period?
2) Is there a discrete-time survival model option within the st
commands? I was using the command "dthaz" for discrete time models,
but that does not seem compatible with "mi estimate".
Thanks, Clara
Here's my syntax and output for creating the person period dataset:
* I used the command prsnperd to create the person-period dataset as follows
. list newid time evercc censor if newid==1002 | newid==1007 |
newid==1086 , noobs
+--------------------------------+
| newid time evercc censor |
|--------------------------------|
| 1002 5 0 1 |
| 1007 4 1 0 |
| 1086 1 1 0 |
prsnperd newid time censor
list newid _period _Y _d1 _d2 _d3 _d4 _d5 _d6 if newid==1002 |
newid==1007 | newid==1086 , noobs
+----------------------------------------------------------+
newid _period _Y _d1 _d2 _d3 _d4 _d5 _d6
----------------------------------------------------------
1002 1 0 1 0 0 0 0 0
1002 2 0 0 1 0 0 0 0
1002 3 0 0 0 1 0 0 0
1002 4 0 0 0 0 1 0 0
1002 5 0 0 0 0 0 1 0
----------------------------------------------------------
1007 1 0 1 0 0 0 0 0
1007 2 0 0 1 0 0 0 0
1007 3 0 0 0 1 0 0 0
1007 4 1 0 0 0 1 0 0
1086 1 1 1 0 0 0 0 0
+----------------------------------------------------------+
*
* 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/