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
or
. tsset, clear
before -mi set-ing the data or
. mi xtset, clear
or
. 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.
--Yulia
[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/