We are trying to build a multistate model to be able to estimate state occupancy probabilities using "predictms". We also wanted to use the multiple imputation package in STATA to address missing variables. I'm having difficulty making the two packages work together and was wondering if anyone have any suggestions.
I first "msset" the dataset for multistate modeling. Then "mi set wide" the dataset for multiple imputations. I imputed the missing observations using "mi impute". Then "mi stset" the dataset for survival analysis. I need to now generate prediction models for each transition within each imputed dataset. I used the following code:
"mi estimate, cmdok : stmerlin age if _trans1==1, distribution(cox)"
But when I try to use predictms after, I get an error message saying only merlin estimates can be used.
Essentially my question is how can I use estimates from "mi estimate" with predictms? If it's not possible, is there any way around it such that we can use both multiple imputation and predictms?
Appreciate it any help or suggestions!
I first "msset" the dataset for multistate modeling. Then "mi set wide" the dataset for multiple imputations. I imputed the missing observations using "mi impute". Then "mi stset" the dataset for survival analysis. I need to now generate prediction models for each transition within each imputed dataset. I used the following code:
"mi estimate, cmdok : stmerlin age if _trans1==1, distribution(cox)"
But when I try to use predictms after, I get an error message saying only merlin estimates can be used.
Essentially my question is how can I use estimates from "mi estimate" with predictms? If it's not possible, is there any way around it such that we can use both multiple imputation and predictms?
Appreciate it any help or suggestions!