I am using predictnl with meansurv following stpm2 on imputed data to obtain average relative survival at one month follow-up. Unfortunately, the created "ms_imp" following prediction was empty with no values. I did not have any problems using meansurv with complete case data the trouble however was when using imputed data.
The syntax I have used as follows:
mi stset time30day, fail(status30day== 1) id(id) scale(365.25)
xi: mi estimate, post eform cmdok esampvaryok sav(mi_stpm2,replace): ///
stpm2 agegrp2-agegrp5 sex cohortgrp2-cohortgrp4 i.diabetes_b i.prevmi i.prevchf i.prevpci i.prev_cabg i.pre_stroke i.pvd i.crf i.hypertension_b ///
i.systolicbp1 i.smoker_ever i.copd i.heartrate1 i.ST_dev i.C_arrest i.diuretic_loop ///
i.aspirin_adm i.statin_adm i.bblocker_adm i.ace_arb_adm i.reperfusion i.reperfusion_inter, df(2) scale(h) bhaz(rate) ///
eform tvc(agegrp2-agegrp5) dftvc(2)
range timevar 0 0.082 100
mi predictnl ms_imp= predict(meansurv timevar(timevar)) using mi_stpm2
I hope you can help in this.
Thank you in advance
Oras
The syntax I have used as follows:
mi stset time30day, fail(status30day== 1) id(id) scale(365.25)
xi: mi estimate, post eform cmdok esampvaryok sav(mi_stpm2,replace): ///
stpm2 agegrp2-agegrp5 sex cohortgrp2-cohortgrp4 i.diabetes_b i.prevmi i.prevchf i.prevpci i.prev_cabg i.pre_stroke i.pvd i.crf i.hypertension_b ///
i.systolicbp1 i.smoker_ever i.copd i.heartrate1 i.ST_dev i.C_arrest i.diuretic_loop ///
i.aspirin_adm i.statin_adm i.bblocker_adm i.ace_arb_adm i.reperfusion i.reperfusion_inter, df(2) scale(h) bhaz(rate) ///
eform tvc(agegrp2-agegrp5) dftvc(2)
range timevar 0 0.082 100
mi predictnl ms_imp= predict(meansurv timevar(timevar)) using mi_stpm2
I hope you can help in this.
Thank you in advance
Oras