Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Multiple Imputations by Chained Equations


From   Cristina Cleghorn <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Multiple Imputations by Chained Equations
Date   Mon, 31 Mar 2014 12:54:31 +0100

Hi,

I am trying to use Multiple Imputations by Chained Equations to overcome the missing data in my dataset.


This first step works:

mi impute chained (regress) ragemnthsnew hagemnthsnew rheight hheight hweight rbmi hbmi pemploy4new pedu3new pethnic2 = village rmphone rwatersafe, add(10)


But this second step:

mi estimate: regress sdsheightneg5to5 ddscore ragemnthsnew hagemnthsnew pethnic2 rheight hheight rmphone pedu3new pemploy4new rwatersafe if village==2 & under5==1


gives this error:


estimation sample varies between m=1 and m=11; click here for details
r(459);

Details:

Estimation sample varies across imputations

    There is something about the specified model that causes the estimation sample to be different between
    imputations.  Here are several situations when this can happen:

    1.  You are fitting a model on a subsample that changes from one imputation to another.  For example, you
        specified the if expression containing imputed variables.

    2.  Variables used by model-specific estimators contain values varying across imputations.  This results in
        different sets of observations being used for completed-data analysis.

    3.  Variables used in the model (specified directly or used indirectly by the estimator) contain missing
        values in sets of observations that vary among imputations.  Verify that your mi data are proper and, if
        necessary, use mi update to update them.

    A varying estimation sample can lead to biased or less efficient estimates.  We recommend that you evaluate
    the differences in records leading to a varying estimation sample before continuing your analysis.  To
    identify the sets of observations varying across imputations, you can specify the esampvaryok option and save
    the estimation sample as an extra variable in your data (in the flong or flongsep styles only) by using mi
    estimate's esample() option.


Note about a varying estimation sample with mi estimate using

    mi estimate checks for a varying estimation sample during estimation and saves the result in e(esampvary_mi)
    equal to 1 if e(sample) varies and 0 otherwise.  If saving(miestfile) is used with mi estimate, the
    varying-sample flag e(esampvary_mi) is also saved to miestfile.  mi estimate using checks that flag and
    displays a warning message if its value is 1.  Thus mi estimate using displays the warning message even if
    you are consolidating results from a subset of imputations for which the estimation sample may be constant;
    you can suppress the message by specifying the nowarning option.

    To check whether the estimation sample changes for the selected subset of imputations, you can use mi
    estimate to refit the model on the specified subset.  You can also save the estimation sample as an extra
    variable by using mi estimate's esample() option during estimation.


Does anyone know how I can avoid the error?


Thanks very much,

Cristina

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index