>I would like to know what error am I making. I am trying to run the next loop.
I don't want to write the list of countries in the "foreach" line, so I tried to call this list with a global, like follows:
gl data "C:\Users\aburg\Documents\OECD\Informality\Results \Bases Finales"
gl countries "Argentina_2018" "Bolivia_2018" "Brazil_2018" "Chile_2017" "Colombia_2018" "Costa_Rica_2018" "ElSalvador_2018" "Honduras_2014" "Mexico_2018" "Paraguay_2018" "Peru_2018" "Uruguay_2018"
foreach base in $countries {
use "$data\\`base'"
display "`base'"
tab infformix [fw=fwr]
}
>Runing this I get the following error:
invalid '"'
r(198);
Thank you very much for every one willing to help.
Related Posts with Help to shorten a loop:
Margins after stcox with multiple records, cluster and time-varied covariatesHi, I have a complex dataset with multiple observations and the Cox model has the cluster option an…
difference to difference- dependent variable binaryDear all, I am examining the effect of introduction of minimum wage on employment, my dependent var…
Paired t-test across different countriesDear all I have a hierarchical mass opinion survey data, 83,961 individuals nested in 21 countries.…
Hybrid model w/ crossed random effectsIs there a stata command that allows one to run a hybrid MLM (i.e. 𝑌𝑖𝑗 = 𝛾00+ 𝛽1 ∗ (𝑋𝑖𝑗 − 𝑋…
How to ask stata to read from the specific row using the dictionaryHow to ask stata to read from the specific row using the dictionary, say like I want to skip first f…
Subscribe to:
Post Comments (Atom)
0 Response to Help to shorten a loop:
Post a Comment