Hi I am creating a KM curve to detect the time when the event (revision) happened i.e revision = 1
As you can see I have the date when revision took place (revisiontime).
I generated a time variable (time in years from date of revision from the initial date of surgery - yearsurgery)
As you can see if a revision did not occur revision = 0 the timeuntilrevisionyr3 == .
Once I start setting up my survival data
I get 8 missing
How do I address this ? Or can I generate a rolling time variable if missing assume that they got to the end of the study without being revised.
It is correct to say that if that patient was not recorded as revised then the patient was not revised.
My solution would be - finding the maxdate of revision surgery which would mark the end of the study and inserting this where timeuntilsurgery3 == .
Is this a good way to go about it?
As you can see I have the date when revision took place (revisiontime).
I generated a time variable (time in years from date of revision from the initial date of surgery - yearsurgery)
As you can see if a revision did not occur revision = 0 the timeuntilrevisionyr3 == .
Once I start setting up my survival data
Code:
stset timeuntilrevisionyr3, failure(revision==1)
How do I address this ? Or can I generate a rolling time variable if missing assume that they got to the end of the study without being revised.
It is correct to say that if that patient was not recorded as revised then the patient was not revised.
My solution would be - finding the maxdate of revision surgery which would mark the end of the study and inserting this where timeuntilsurgery3 == .
Is this a good way to go about it?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(SurgeonID Surgery revision) str1 experience float(yearsurgery practiceyears revisiontime timeuntilrevision timeuntilrevisionyr timeuntilrevisionyr3) byte(_st _d) double _t byte _t0 1 1 0 "0" 14611 0 . . . . 0 . . . 2 1 1 "0" 14610 0 16074 1464 122 4.0109587 1 1 4.010958671569824 0 3 1 1 "0" 14611 0 16075 1464 122 4.0109587 1 1 4.010958671569824 0 4 1 0 "0" 15768 0 . . . . 0 . . . 5 1 1 "0" 16865 0 17596 731 60.91667 2.0027397 1 1 2.002739667892456 0 7 1 1 "0" 17628 0 17993 365 30.416666 1 1 1 1 0 8 1 1 "0" 18271 0 19001 730 60.83333 2 1 1 2 0 9 1 1 "0" 16440 0 17536 1096 91.33334 3.00274 1 1 3.002739667892456 0 10 1 0 "0" 18243 3.0931506 . . . . 0 . . . 10 1 0 "0" 18243 3.0931506 . . . . 0 . . . 10 1 1 "2" 18277 3.0931506 20162 1885 157.08333 5.164383 1 1 5.164383411407471 0 10 1 0 "3" 19372 3.0931506 . . . . 0 . . . 12 1 1 "0" 16167 .8438356 16532 365 30.416666 1 1 1 1 0 12 1 0 "0" 16167 .8438356 . . . . 0 . . . 12 1 0 "2" 16444 .8438356 . . . . 0 . . . end format %td yearsurgery format %td revisiontime
Comment