Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: Re: st: MI: Multiple Imputation

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

Shikha Sinha <> 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



*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index