I'm estimating a conditional discrete time logistic regression model in STATA and predict hazard and survival functions after logit using predictnl
predictnl hazard= predict(pr), ci(hazard_lb1 hazard_ub1)
bys x1 x2 time: egen hazard_lb_mean=mean(hazard_lb1)
bys x1 x2 time: egen hazard_ub_mean=mean(hazard_ub1)
bysort id (time): ge survival = exp(sum(ln(1-hazard)))
bysort id (time): ge survival_lb_mean = exp(sum(ln(1-hazard_lb_mean)))
bysort id (time): ge survival_ub_mean = exp(sum(ln(1-hazard_ub_mean)))
when plotting the predictions against time, the confidence intervals for the survival function do not match the point estimates. I'm guessing that this has to do with a wrong transformation from hazard CI to survival CI.
Thanks
predictnl hazard= predict(pr), ci(hazard_lb1 hazard_ub1)
bys x1 x2 time: egen hazard_lb_mean=mean(hazard_lb1)
bys x1 x2 time: egen hazard_ub_mean=mean(hazard_ub1)
bysort id (time): ge survival = exp(sum(ln(1-hazard)))
bysort id (time): ge survival_lb_mean = exp(sum(ln(1-hazard_lb_mean)))
bysort id (time): ge survival_ub_mean = exp(sum(ln(1-hazard_ub_mean)))
when plotting the predictions against time, the confidence intervals for the survival function do not match the point estimates. I'm guessing that this has to do with a wrong transformation from hazard CI to survival CI.
Thanks