Hi all,
I'm trying to run the following code where I try renaming a variable to a macro but it keeps failing.
foreach test in $Tests {
use "$crosswalk_path" if lcd == "`test'", clear
local testname = test[1]
capture noisily {
use "$data_extract_dir/`test'.dta", clear
merge m:1 msa date using "$data_extract_dir/Data.dta", ///
preserve
rename result `testname'
restore
}
}
The error message I keep getting is Syntax is rename oldname newname [, renumber[(#)] addnumber[(#)] sort ...] rename (oldnames) (newnames) [, renumber[(#)] addnumber[(#)] sort ...] rename oldnames , {upper|lower|proper}.
Can anyone help me fix this?
Related Posts with Can't rename variable to macro
Suest and r-squared?Hi,
Does anybody know if there is an option to show the r-squared with suest? And if not, is there …
High R-square in ppmlHi statalist,
I would like to clarify few things about using ppml on gravity data.
1. I'm trying t…
How to show the unique value of a characteristic variable in panel data?I am having a panel data with the unit is firms in 65 countries around the world with the time serie…
Counting readmission rate from the index dateI have the below data fields. How to count the number of admissions pre 30 days and post 30 days fro…
Fixed effectDear all,
I will please like to find out the explanation for the issue below.
I have a cross secti…
Subscribe to:
Post Comments (Atom)
0 Response to Can't rename variable to macro
Post a Comment