Hi there,
I have a number of files named filename1990.dta, filename1991.dta etc until 2018. I would like to write a loop doing two things:
1) append the files, and
2) create a variable 'year' corresponding to the file name (2004, 2005, 2006) to show me which year the data came from.
thanks in advance for your help!
Liza
Related Posts with loop to append multiple files and add new variable
Avergaing values of variables to reduce survey observationsHi, I am looking for a solution to average the survey respones. Below S007 is suvey respondent ID, …
how to know whether a placebo test is passedHello! I'm conducting a placebo test on a staggered DID, I randomly assign treatment firms and poli…
Something wrong with -colorpalette-Dear Stata users, I have installed the -colorpalette- wrote by Ben Jann, and I remenber that it run…
Interpreting significant interaction effect while main effect is insignificantHi! I am investigating the effect of balanced ambidexterity and combined ambidexterity on firm perf…
Stata for loop errorHi, I am trying to run the below loop in stata. But i get an error. Can someone help me. I am a be…
Subscribe to:
Post Comments (Atom)
0 Response to loop to append multiple files and add new variable
Post a Comment