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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: mi may not be combined with by


From   Paul von Hippel <paulvonhippel.utaustin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: mi may not be combined with by
Date   Wed, 23 Nov 2011 09:39:17 -0600

The following command
 bysort dataset: mi impute reg x y, add(5)
returns the following error:
 mi may not be combined with by
Are there other ways to do what I think the command should do here?
Many thanks for any suggestions.

Some background: I have simulated 60 incomplete hundred-row datasets,
stacked one on top of the other in a Stata data file. The variables
are x and y, and the datasets are indexed by a third variable called
dataset. Like this:

. list dataset x y

       +----------------------------------+
       | dataset           x            y |
       |----------------------------------|
    1. |       1   2.2345289   -22.217398 |
    2. |       1           .   -21.833361 |
    3. |       1   4.6491754   -17.114244 |
<snip>
  101. |       2   6.5433351   -17.183628 |
  102. |       2           .   -13.853756 |
  103. |       2           .   -13.690219 |
<etc>


--
Best wishes,
Paul von Hippel
Assistant Professor
LBJ School of Public Affairs
Sid Richardson Hall 3.251
University of Texas, Austin
2315 Red River, Box Y
Austin, TX  78712

mobile, preferred (614) 282-8963
office (512) 232-3650

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index