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:
- 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.
- 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.
Thanks in advance,
Michael
0 Response to Using mysuest to compare coefficients from different imputations
Post a Comment