Hello cem-list,

I am a new user of cem and for some reason, the google search function of the archives returns zero results when I attempt to search for previous posts on this topic. I have browsed the past 5-6 months of postings and have not found a post on this particular error, so I will go ahead and post my question.

I have created 5 MI-imputed datasets in Stata, and placed them in my current working directory. Per the cem manual, I have the first one open, and I attempt to run imb using the miname and misets options. I get the following error:

variable __000000 not found
               st_data():  3500  invalid Stata variable name
             imbalance():     -  function returned error
                 <istmt>:     -  function returned error
r(3500);

When I run imb or cem on just the first dataset in memory (i.e. the command line is exactly the same, just without the miname and misets options), it works just fine. So something appears to be going wrong when I specify the mi options. I did verify that the file names have the appropriate stem ("imputed") and they reside in the working directory, and there are 5 of them (misets = 5).

The set trace command in Stata shows the error occurring at this step:

  - mata: imbalance("`varlist'","`breaks'","`treatment'",`uw',"`miname'",`misets')
  = mata: imbalance("age_begin ea_urban hf_type hf_level hf_cqi hf_baylor hh_wealthq_dhs m_educx","scott","hf_arm",0,"imputed",5)

Also, I am using Stata 12 on a Windows 7 machine. 

Many thanks for any tips on this! 

Julie Rajaratnam