Dear Stata specialist,
I need help with survival analysis, here is the story. I am currently working on a project to use survival analysis to study the retention rate of new immigrants in rural areas.
The time variable is the year (year 1, year 2, year 3..... etc), and the event is retention (0 if immigrants stay in a rural area in the year, 1 if immigrants leave a rural area in the year). The failure is event=1
My question is I am trying to use marital status (it is a categorical variable that has 3 groups: married/common-law; single; separated/widowed/divorced) as one factor in my cox regression, however, one challenge is that it may be possible maybe some immigrants in year 1 is single, in year 2 is still single, but then in year 3, his status changed to married.
In this case, how should I code the variable for marital status? Is there a way to do it?? Please advise.
Thanks
Yuchen
Related Posts with Need help with survival analysis
Panel Data CEO-firm fixed effectsDear Statalists, I am new to Stata. I have one inquiry on performing the CEO-firm fixed effects for…
Cleaning dataHi, first post on stata forum here: Hello. I have a survey dataset with lots of -5, -4, -3, -2, -1 f…
Query regarding the Hansen statistic obtained after xtabond2Hello, I have a question regarding running the xtabond2 command, with alternating years of data. I …
Command -ritest- for randomization inference in Stata now available from SSC.Thanks to Kit Baum, -ritest- is now available for download from SSC. -ritest- is a module to conduct…
Regressions on each sample after propensity score matchingDear All I have not used propensity score matching before. I read lots of materials but I am still c…
Subscribe to:
Post Comments (Atom)
0 Response to Need help with survival analysis
Post a Comment