Dear Statalist,

I am trying do run a Cox regression on an imputed dataset using restricted cubic splines. I used the following code (the data are correctly stset, and stcox using the imputed datasets works fine):

Code:
mi set mlong                                                                                                                                     
mi register imputed HADSA_gli PartAg_gli Sex                                                                                                                  
mi impute chained (pmm, knn(10)) HADSA_gli PartAg_gli Sex , add(10)  

mi estimate, post  sav(miest, replace) : stcox i.HADS_A_gli PartAggli_spline1 PartAggli_spline2 i.Sex if glicopd_HUNT==1 | glicopd_HUNT==2 & HADS_A_gli!=. & PartAg_gli>=40.0 & PartAg_gli<=85.0
When I run the last command, I get the error message
r(603); file miest.ster could not be opened
, meaning that miest.ster exists, but can't be opened.

What do I do wrong?