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 error r(119) appears in a not mi set database


From   Timothy Mak <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: mi error r(119) appears in a not mi set database
Date   Wed, 2 Apr 2014 17:50:55 +0800

Looks like you have a dataset which was -mi set- at some point, but has its _mi_m variable deleted. To Stata, your dataset is corrupted, and it doesn't know whether to treat it as -mi set- or not set. The best thing is probably to contact whoever gives you the data and get him/her to send you a dataset that is either clearly -mi set- or not set. 

Tim

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lucas Andrés Salas D
Sent: 01 April 2014 21:33
To: [email protected]
Subject: st: mi error r(119) appears in a not mi set database

Dear statalisters,

We have found a recurrent error message with some databases when
working with Stata/SE 12.1. We work with several collapsed long and
complete long panel databases which are not mi set.

This time I was working with an unbalanced long panel database (n=120
subjects with a  yearly follow up from 1945 to 2011).

As I tried to xtset my database to obtain some descriptive summary
before collapsing I got the following error:

xtset id2 year, yearly
no; data are mi set
    Use mi xtset to set or query these data; mi xtset has the same
syntax as xtset.

    Perhaps you did not type xtset.  Some commands call xtset to
obtain information about the settings.  In that case, that command is
not appropriate
    for running directly on mi data.  Use mi extract to select the
data on which you want to run the command, which is probably m=0.
r(119);

My database is not imputed neither any of the original ones (I tried
with the mother databases and they worked just fine when xtset).

I tried mi unset  unsuccessfully:

mi unset
_mi_m not found

mi xtset id2 year, yearly
_mi_m not found


I tried to save as old Stata 9/10 and reopen, but the error persist.

Finally I decided to outsheet/insheet the database and then xtset worked:

xtset id2 year, yearly
       panel variable:  id2 (unbalanced)
        time variable:  year, 1945 to 2011
                delta:  1 year


Any ideas of what is happening and how to solve it?

Best,

Lucas
-- 
Lucas A Salas, MD MSc MPH
PhD researcher
CREAL - Centre for Research in Environmental Epidemiology
ISGlobal alliance
Barcelona Biomedical Research Park - PRBB
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index