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

Re: st: MI: strange problem

From   [email protected] (Yulia Marchenko, StataCorp LP)
To   [email protected]
Subject   Re: st: MI: strange problem
Date   Mon, 04 Jan 2010 09:05:21 -0600

John Antonakis <[email protected]> asked about the r(111), "variable not
found", error after -mi impute-:  

> I am trying to use -mi-.  I run the following with a data set that has not
> been declared as panel:
> qui mi set mlong
> qui mi register imputed rule mal94p
> qui set seed 29390
> mi impute mvn rule mal94p = lat loggdp2 pop100km rel_frac, add(10)
> I get the following error:
> . mi impute mvn rule mal94p = lat loggdp2 pop100km rel_frac, add(10)
> variable year not found
> r(111);
> I don't have a variable named YEAR in the dataset.
> ...
> Any ideas?

-mi impute- checks if the variables declared as -tsset-, -xtset-, etc. are
also registered as imputed or passive variables and issues an error if they
are or if they don't exist.  The error message John encountered is most likely
due to variable "year" being previously declared as a time or panel variable
with -tsset- or -xtset- and then dropped from the dataset.  We will improve
this error message in the future.

Prior to using -mi-, John should clear old no-longer-valid time-series or
panel-data settings by typing

  . xtset, clear


  . tsset, clear

before -mi set-ing the data or

  .  mi xtset, clear


  . mi tsset, clear

after -mi set-ing the data.  If this does not solve John's issue, John can
send me his dataset privately and I'd be happy to take a look at the problem
and report back to the list.

[email protected]

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index