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]

RE: st: Multiple Imputations by Chained Equations


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

Thanks, I have tried this and am still getting the same error message.

Just to check would it be like this, with the under5 in after the equals and then by (under5)?:

mi impute chained (regress) ragemnthsnew hagemnthsnew rheight hheight hweight rbmi hbmi hemploy4new hedu3new pethnic2 = rmphone village remploy4new redu3new rwatersafe under5, add(10) by (under5)

then:

mi estimate: regress sdsheightneg5to5 ddscore ragemnthsnew hagemnthsnew pethnic2 rheight hheight rmphone redu3new hedu3new remploy4new hemploy4new rwatersafe if under5==1



I haven't included ddscore in the imputation as this is the dependent variable of interest. Is this correct?

Thanks!

________________________________________
From: [email protected] [[email protected]] On Behalf Of Stas Kolenikov [[email protected]]
Sent: Monday, 31 March 2014 2:07 p.m.
To: [email protected]
Subject: Re: st: Multiple Imputations by Chained Equations

You may need to impute your -under5- variable, as well. Your
imputation crosses with your -if- condition somehow, so you need to
make sure that there are no conflicts between the imputed variables,
the -mi-regular variables, and the if-condition variables.


-- Stas Kolenikov, PhD, PStat (ASA, SSC)
-- Principal Survey Scientist, Abt SRBI
-- Opinions stated in this email are mine only, and do not reflect the
position of my employer
-- http://stas.kolenikov.name



On Mon, Mar 31, 2014 at 6:54 AM, Cristina Cleghorn
<[email protected]> wrote:
> 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/
*
*   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/

*
*   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