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: Re: st: MI: Multiple Imputation


From   [email protected] (Wesley D. Eddings, StataCorp)
To   [email protected]
Subject   Re: Re: st: MI: Multiple Imputation
Date   Mon, 20 Dec 2010 18:00:33 -0600

Shikha Sinha <[email protected]> asked about using the -by- prefix
with -mi estimate-:

> A follow-up question: How can I run the following command for each country?
> Can I use bysort,
>
> mi estimate, or: logistic Y X1 X2 edu

The -mi estimate- command does not support the -by- prefix.  Shikha may
instead run -mi estimate- inside a loop and use an -if- qualifier to restrict
estimation to a particular country.  Here are the commands for the model
Shikha mentioned:

* begin commands
quietly levelsof country, local(countries)
foreach c of local countries {
   mi estimate, or: logistic Y X1 X2 edu if country==`c'
}
* end commands

--Wes
[email protected]


  

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


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