Hi all, I am currently working with a dataset which contains information on subject's age, whether go to college (binary) and many other variables. I will need to use survival analysis in the near future but I was stuck at the very first step of declaring the dataset. So below is a snapshot of what the data looks like.
Basically, I want to examine at what time does participant went to college. I created this censor variable as totally the same as the binary college variable cuz I suppose they are the same? I also created this time variable indicating the number of years before each participant went to college (if they had). Basically is the difference between age variable and the age when they went to college. I read some documents about this model but am really confused about what does censor mean in my case. So how could I first of all make this dataset a st data (STATA gives me an error says "data is not st")?
Thanks!
Code:
id censor college time BirthYear age 10 0 0 1990 17 15 0 0 1991 16 21 0 0 1990 17 34 0 0 1990 16 36 1 1 3 1990 16 39 0 0 1990 17 41 0 0 1990 17 42 0 0 1991 17 43 0 0 1991 16 44 0 0 1991 17 50 0 0 1991 16 59 0 0 1991 16 70 1 1 5 1991 16
Thanks!
Comment