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
0 Response to foreach loop error r(100) using required
Post a Comment