I am trying to define a global directory path with local string in it and then load data using this directory path. But stata gives me an error: invalid 'Finland'. When I display the global path, I get "C:/Users/me/Desktop/Orbis/Analysis/Finland"". So I think something is wrong how I define the global path. Any help is greatly appreciated. I Here is the code:
Code:
foreach j in "Finland" "Spain" "Germany" { global mainpath "C:/Users/me/Desktop/Orbis/Analysis/"`j'"" use "${mainpath}\Data\"`j'"_clean_nofire.dta", clear }
Comment