Hello everyone,

I require some assistance with regard to using mysuest for the sake of comparing coefficients from two different linear regression models. The first model is supposed to be based upon the first five imputations, whereas the second model is supposed to be based upon the last five imputations. This is due to me having performed imputations for different subpopulations.

I have figured out how one, in principle, could proceed using mysuest, but I struggle to specify it so as to apply to imputations 1-5 and 6-10 respectively, as would be possible when using the options imputations(1/5) or imputations(6/10) for mi estimate. Here is a part of what I have attempted thus far:


program mysuest, eclass properties(mi)
version 12.0
args model1 model2

qui `model1'
estimates store est1
qui `model2'
estimates store est2
suest est1 est2
estimates drop est1 est2

ereturn local title "Comparison of coefficients"
end

mi estimate, esampvaryok post: mysuest "regress log_ghrw2 cit_dk_dum" "regress log_ghrw2 cit_uk_dum"


My two failed attempts at achieving the aforementioned goal consisted of the following:
  1. Using "mi passive" to create a new dummy variable coded 1 for the first five imputations and 0 for the last five (or vice versa) and performing the regress commands if the dummy is ==1 or ==0.
  2. Modifying mysuest so as to include "mi estimate, imputations(1/5)" as well as "mi estimate, imputations(6/10)", but I think that I would have to copy the current frame and drop the new frame within mysuest to do so. Unfortunately, I have not figured out how to do so.
This is my first time using Stata, and statistics software more generally, to write a term paper. I hope not to have made an obvious beginner's mistake. And I hope that the post does not breach any forum rules. I apoligize if it does.

Thanks in advance,

Michael