I am getting the following error in Stata while using a do file with a local macro:
clear
capture log close
sysuse auto,clear
log using stata,text replace
local varlist price mpg rep78 weight length
reg 'varlist'
local close
Output
local varlist price mpg rep78 weight length
reg 'varlist'
invalid name
I know that this is a very trivial issue, but I am not sure where this error is coming from.
Note that I didn't get error when I used global macro.