Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Bert Lloyd <bert.lloyd.89@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Unable to create local macro in modified ado-file (xtreg_fe.ado) |
Date | Mon, 16 Jan 2012 19:36:41 -0500 |
Hello all, Thank you very much for the discussion. Regarding Nick Cox's valuable suggested partial test (macrotest), that and other similar tests work fine in ado-files that I create myself from scratch, as well as others borrowed from co-workers, etc. This problem has only occurred when attempting to modify Stata ado-files. Regarding the hypothesis that there are other copies of the ado-files creating problems, I have scoured my personal ado folder and am certain that there are no old copies there. Also, any modifications I make to the code (for example changing the number of stars in my noisily di "*** [etc]" lines immediately have their intended effect. Regarding the possibility of a well-hidden typo, of course I cannot exclude this entirely but I have proofread quite carefully, done searches for l vs 1, etc. Regarding the mysterious "est hidden scalar" line, I am not sure what that is but it appears verbatim in Stata 12.0's xtreg_fe.ado (in the Stata12/ado/base/x folder, v1.8.3). It does not appear in Stata 11.2's xtreg_fe.ado (in the Stata11/ado/update/x folder, v1.7.7), so it appears to be something new to Stata 12. I have adjusted the simple example accordingly, creating xtreg_fe_s112_v177_modified.ado from the Stata 11 version and xtreg_fe_s12_v183_modified.ado from the Stata 12 version, and adjusted the test_xtreg_fe_modified.do file to call the correct ado-file depending on the version of Stata being run (11.2 vs 12). Links to all 3 files are provided below. In both cases, the results are the same as in my original test and with Dan Klein's macval workaround -- the standard way does not produce anything, while macval() does work. Links to updated do- and ado-files: http://dl.dropbox.com/u/57392331/xtreg_fe/test_xtreg_fe_modified.do http://dl.dropbox.com/u/57392331/xtreg_fe/xtreg_fe_s12_v183_modified.ado http://dl.dropbox.com/u/57392331/xtreg_fe/xtreg_fe_s112_v177_modified.ado Again, thanks to all for the suggestions and and further thoughts greatly appreciated. - BL * * 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/