Hello all,
Much of the focus in Stata is on continuous time survival data and there really isn't much information regarding incorporating TVCs in discrete time survival analysis. My 'problem' is the following (not really specifically to do with Stata - more of a layout issue):
My reading of the scant exercises on discrete time survival analysis is that one can use some commands to expand the dataset into a person-period dataset. However, I have a variable 'Residence' (1 = in university residence, 0 otherwise) which is recorded for each year that a student is at university. I am unsure how to lay it out - should Year 1, Year 2 etc. be separate column variables? Also, I have a series of cohorts (students who started in 2006, students who started university in 2007 etc) which effectively means the 'Year 1' would be different depending on when the person entered university. Of course, the more 'natural way' to lay out the data is to record the Residence status in one column, and use the row to separate the years. However, what will Stata do when I use the command to expand it into a person-period dataset?
I've attached an example. Obviously, I know that when I actually do the survival analysis, the format will be like in the second part in the image. My question is can I put it in that format before using the person-period command?
I suppose this question also applies to cumulative GPA after year 1, year 2 etc...
Much of the focus in Stata is on continuous time survival data and there really isn't much information regarding incorporating TVCs in discrete time survival analysis. My 'problem' is the following (not really specifically to do with Stata - more of a layout issue):
My reading of the scant exercises on discrete time survival analysis is that one can use some commands to expand the dataset into a person-period dataset. However, I have a variable 'Residence' (1 = in university residence, 0 otherwise) which is recorded for each year that a student is at university. I am unsure how to lay it out - should Year 1, Year 2 etc. be separate column variables? Also, I have a series of cohorts (students who started in 2006, students who started university in 2007 etc) which effectively means the 'Year 1' would be different depending on when the person entered university. Of course, the more 'natural way' to lay out the data is to record the Residence status in one column, and use the row to separate the years. However, what will Stata do when I use the command to expand it into a person-period dataset?
I've attached an example. Obviously, I know that when I actually do the survival analysis, the format will be like in the second part in the image. My question is can I put it in that format before using the person-period command?
I suppose this question also applies to cumulative GPA after year 1, year 2 etc...
Comment