Dear stata members,
I am trying to loop over multiple files (rounds) of data. In the first two rounds of data, there are only 2 wage variables. However, in the later rounds there are 5 wage variables. Even when I generate the 3 wage variables that are missing in rounds 1 and 2 in those rounds using a unique round_ID, I get the error that those variables are already defined. What command do I add into the loop to tell stata to either skip over these variables in the first two rounds or generate the variables such that it doesn't give me an error later?
Thanks in advance.
Best,
Janaki
Related Posts with looping over multiple files - there are new variables in some files
Help with countsHello, I am working on a prescribing data set containing details of about 100,000 people. The lay o…
How drop some elements from a macro list of filesHi Statalist I have a question. I have the following datasets: 2008_a8.txt, 2010_a4.txt, 2012_a7.t…
Textbox position in bar graphsI am trying to change the position of subtitles in bar graphs. I've created a MWE from Stata's datas…
How check if value in one variable is equal to any value in other variablesI am trying to gen a variable or variables that say VAR1 has elements in commons with other 2 variab…
How to rescale A variable by rangeHello statalist members, i want to rescale my contious variables(x,y) by range(maximum-minimum) beca…
Subscribe to:
Post Comments (Atom)
0 Response to looping over multiple files - there are new variables in some files
Post a Comment