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]
Re: st: Unable to create local macro in modified ado-file (xtreg_fe.ado)
From
Richard Williams <[email protected]>
To
[email protected], [email protected]
Subject
Re: st: Unable to create local macro in modified ado-file (xtreg_fe.ado)
Date
Mon, 16 Jan 2012 22:51:45 -0500
At 07:36 PM 1/16/2012, Bert Lloyd wrote:
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.
I finally tracked back to your original message. I think the problem
has to do with version control. Again, most of xtreg_fe.ado is being
run with version set to 6. Try this code:
version 11.2
local my_test_local Hello world
noisily di "*****************"
noisily di "local my_test_local contains"
noisily di "`my_test_local'"
noisily di "evaluating the local
my_test_local using macval() yields"
noisily di "`macval(my_test_local)'"
noisily di "*****************"
version 6
local my_test_local Hello world
noisily di "*****************"
noisily di "local my_test_local contains"
noisily di "`my_test_local'"
noisily di "evaluating the local
my_test_local using macval() yields"
noisily di "`macval(my_test_local)'"
noisily di "*****************"
It works fine with version set to 11.2. It produces the same problem
you got when version is set to 6. If you dug through the history of
changes to Stata you could probably figure out why.
So, either change the version for your block of code -- and then
reset it to version 6 -- or rewrite your code so it works right under
version 6.
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
WWW: http://www.nd.edu/~rwilliam
*
* 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/