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
How do I create a constant sample of firmsHi, I would need some help with the following problem please, I'm a new STATA user: I have a list o…
How to deal with error correlation model with Stataregression function is : Array Array In the following data, variable value is the value of 1952,…
How to extract one variable from a string?We have a dataset of different movies but genres contain more than one variable. For example, under …
Robust option in a ols modelHi everyone, I was wondering if one can use robust option in a ols regression model that includes bo…
duplicates tag in a foreach loopHello everyone. I am trying to make this loop run but it keeps on giving me { required r(100). I am…
Subscribe to:
Post Comments (Atom)
0 Response to foreach loop error r(100) using required
Post a Comment