Hi,
I'm looking for help with hazard function plot.
Sample of dataset:
ID Age Drugduration Hypertension Event EventDay Censored
1 76 200 1 0 83 0
2 80 180 0 1 214 0
3 85 120 1 0 275 1
I used these codes:
However, the plot does not begin at t=0. It begins at t=180. I have checked my dataset and EventDay data begin at t=3.
Then I tried to predict the baseline hazard contribution using these codes:
There are 935 missing values generated from the code. These missing values are from patient with Event=0.
Can anyone give a possible suggestion/fix for these problems?
Thanks.
Wa
I'm looking for help with hazard function plot.
Sample of dataset:
ID Age Drugduration Hypertension Event EventDay Censored
1 76 200 1 0 83 0
2 80 180 0 1 214 0
3 85 120 1 0 275 1
I used these codes:
Code:
stset EventDay, failure(Event) id(ID) stcox Age Drugduration stcurve, hazard kernel(gauss)
Then I tried to predict the baseline hazard contribution using these codes:
Code:
predict hr1, basehc predict xb, xb gen haz = hr1*exp(xb)
Can anyone give a possible suggestion/fix for these problems?
Thanks.
Wa
Comment