Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: multiple state surv. analysis


From   Stephen McKay <[email protected]>
To   [email protected]
Subject   st: multiple state surv. analysis
Date   Sun, 23 Nov 2003 15:45:21 +0000

> From: "Maryah Fram" <[email protected]>
> 
> Hi -- I'm a new stata user, and trying to do an analysis in stata
> for which I have syntax in R, as follows:
> coxph(Surv(DUR,UNC)~B+J+Q16+strata(STRT)+cluster(ID)).
> I'm looking at transitions between unemployment and work status
> during a two-year study, where DUR is time between transitions, UNC 
indicates final status is censored, B, J and Q16 are covariates, ID is 
the individual's id number, and STRT is a 4-level stratification
> variable indicating the type of transition (job to job, no job to 
job, etc.).  I can't figure out how to handle the STRT in Stata.  Could 
someone point me to the correct place in the manual? Or give any advice?
> Thanks,  Maryah

Your use of strata in R is somewhat different to what is envisaged in 
R; examples generally relate to (say) sex and agegroup where you fit a 
different baseline hazard for each such group (eg in famous books by 
Fox, Venables).  You seem to be attempting a shortcut to avoid setting 
up a series of different models?  This is potentially hazardous (excuse 
the pun) if you have in your dataset different variables of relevance 
only to some states (eg working hours, pay rate if working, type of 
benefit if not working - as would be typical).  So even in R I would 
set up different variables for each transition possibility than rely on 
the strata option to do the work for you in this way - after all it 
sounds like only two models (job to no job, no job to job) once the 
censoring var is set properly.

In stata I think you will need to set up separate models for each 
initial state of interest, and indicate the codes for transitions in a 
separate variable.  Start with -stset- in the st manual!

Hope that helps - 

Steve McKay
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index