Hi I create a survival KM graph for those surgeries that had a complication. However, I now want to plot a KM graph which only has death as the failure
Am I plotting this correctly?
I have a variable with survivaltime - survivalt-, this takes:
1. Date of complication (if patient had a complication)
OR
2. Date of death (if patient died)
OR
3. Last date i.e end of follow up date if patient did not die and did not sustain a complication
I suppose if the patient had a complication and then died a few years late - the variable -survivalt- should take the date of death rather than the date of the complication, as death is what I am interested in, is this assumtpion correct?
Am I plotting this correctly?
I have a variable with survivaltime - survivalt-, this takes:
1. Date of complication (if patient had a complication)
OR
2. Date of death (if patient died)
OR
3. Last date i.e end of follow up date if patient did not die and did not sustain a complication
Code:
///This is the normal survvial km graph is patient had a complication
stset survivalt [pw=attweight], failure(complication==1)
sts graph, by(procedure)
////What about death
st survivalt [pw=attweight], failure(died==1)
//KM curves to compare death
sts graph, by(procedure)
Comment