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: Re: mi may not be combined with by


From   Paul von Hippel <[email protected]>
To   [email protected]
Subject   st: Re: mi may not be combined with by
Date   Wed, 23 Nov 2011 13:54:35 -0600

Never mind this question. Stata Technical Support tells me I should be
using the by option instead of the bysort prefix. So the right command
is
 mi impute reg x y, ll(0) add(5) by(dataset)


On Wed, Nov 23, 2011 at 9:39 AM, Paul von Hippel
<[email protected]> wrote:
> 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
>



-- 
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index