Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Steve Samuels <sjsamuels@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: declaring a person period dataset and fitting discrete-time survival models with st and MI |
Date | Mon, 9 Aug 2010 13:08:42 -0400 |
Discrete analysis is covered in Lesson 6, not Lesson 8, at: http://www.iser.essex.ac.uk/study/resources/module-ec968. The link to Lesson 6 is: http://www.iser.essex.ac.uk/files/teaching/stephenj/ec968/pdfs/ec968st6.pdf My apologies for the incorrect reference. Steve On Thu, Aug 5, 2010 at 11:55 AM, Steve Samuels <sjsamuels@gmail.com> wrote: > -cloglog- is an official Stata command, so perhaps it will work with > MI. With data in the person-period format, --cloglog- does not take > a "time" variable. See "lesson 8" referenced below > > The _d1 _d2 dummies are used as covariates so that you can get a > separate estimate of the probability in each period. > > > See Chapter 9, especially Section 9.3, of Stephen Jenkins's wonderful > book "Survival Analysis" at > http://www.iser.essex.ac.uk/files/teaching/stephenj/ec968/pdfs/ec968lnotesv6.pdf > > and his lesson 8 on setting up the analysis with Stata at > http://www.iser.essex.ac.uk/survival-analysis > > all at: > http://www.iser.essex.ac.uk/study/resources/module-ec968 > > Steve > > -- > Steven Samuels > sjsamuels@gmail.com > 18 Cantine's Island > Saugerties NY 12477 > USA > Voice: 845-246-0774 > Fax: 206-202-4783 > > > On Thu, Aug 5, 2010 at 9:08 AM, Clara Barata > <maria_barata@mail.harvard.edu> wrote: >> 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/ >> > -- Steven Samuels sjsamuels@gmail.com 18 Cantine's Island Saugerties NY 12477 USA Voice: 845-246-0774 Fax: 206-202-4783 * * 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/