Hello everyone,
I have a part of short code that generate invalid name but I couldn't figure out why. My goal is to generate a long varlist to use in subsequent. Any help or suggestions would be appreciated. Thanks a lot!
The error return is:
I have a part of short code that generate invalid name but I couldn't figure out why. My goal is to generate a long varlist to use in subsequent. Any help or suggestions would be appreciated. Thanks a lot!
Code:
set more off, permanently
use unbalanced.1--16.dta, clear
local VarsLabor LegalEntityCode PersonnelEducationExpenses Employment TotalProfit IndustrySalesValue_currentpr ///
LaborUnionPersons LaborUnionExpense
foreach x of local VarsLabor{
foreach i of numlist 1/16{
local `x'l "`x'l" "`x'`i'"
}
dis "``x'l'" ,
local VarsLaborFull "`VarsLaborFull'" "``x'l'"
}
display "`VarsLaborFull'"
keep `VarsLaborFull'
Code:
" invalid name

Comment