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
diffrence in diffrenceHi everyone, this is my first post here so I hope I can get some help I want to measure a model lik…
Diversification VariableHello everyone, I'm trying to generate a proper diversification variable from my data. What I want …
How to choice the proper tobit model with several restrictions in the data for fixed models.Dear Statalisters, I am writing for help because I need the following issue: 1) I am studying how …
QUAIDS EstimationHi everyone, Does anyone know a command or ado for QUAIDS estimation that is faster than the in-bui…
How to create a variable that indicates when we have the first non-zero value of another variable - panel dataDear all, I am working with a matched employer-employee dataset from Brazil in which each observati…
Subscribe to:
Post Comments (Atom)
0 Response to foreach loop error r(100) using required
Post a Comment