Open Valery2511 opened 3 years ago
Just in case, I also attach the STATA code:
stcox, estimate
predict baseline_survival, basesurv
Did you had a look at the parametrization of CTVM in STATA/R compared to that of lifelines? I suspect that there you could find the reason why ...
Hello! I am translating the Cox model from STATA to Python and found that the baseline survival in STATA differs from the baseline survival in Python (I started with a simple Cox model without regressors, in STATA is "stcox, estimate"). I calculated the baseline survival manually - this coincided with what the STATA produces (excel-file "BS_test", sheet "Est_baseline", column «I»). BS_test.xlsx
Code in Python:
Then I tried to calculate the baseline survival through the baseline hazard and the results again coincided with the STATA/ manually (excel).
Code in Python:
Can you please tell me why the baseline survival in Python (“ctv.baselinesurvival”) may differ from the baseline survival calculated manually (excel) / in STATA?