Hello I am new to Stata and I am trying to write a foreach loop code, My code is
use "/Users/elenacalifano/Desktop/DATASETS/BankFocus+Lookup"
levelsof filename , local(cnt)
local i=0
foreach c of local cnt {
clear
import delimited "/Users/elenacalifano/Desktop/DATASETS/RISK.WORLDFIN-MR.GMES/RISK.WORLDFIN-MR.GMES //`c'"', varnames(1)
gen filename="`c'"
local i=`i'+1
save "/Users/elenacalifano/Desktop/DATASETS/2023.04.07.RISK.WORLDFIN-MR.GMES/RISK.WORLDFIN-MR.GMES//bank`i'.dta", replace
}
and gives the error r(100) using required. Could anybody help me with this ? Thankyou in advance
Related Posts with foreach loop error r(100) using required
Coupled forestplotDear Stata user, I could create one with the midas command using the following code: midas tp fp fn …
Import Excel Loop issuesHello everyone, I'm trying to write code to import certain worksheets from an excel workbook, but I …
Spatial Panel analysis for SYS-GMMHello, I have a problem. I have my model SYS_GMM (level e diff) done by using xtabond2 of Arellano a…
Tabulation only for freq>=5Hello, I am running this tabulate command to display some studentized residuals: tabulate cname if …
Equivalent of 'exposure' variable for xtlogit regression for diff-in-diffDear All, I am running a logistic FE regression to estimate a the effect of a 'treatment' using a g…
Subscribe to:
Post Comments (Atom)
0 Response to foreach loop error r(100) using required
Post a Comment