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
Export mdesc table to ExcelI am wondering if there is way to export (not copy paste) and mdesc table (run on the full set of my…
Displaying mean values for groups on a lineHello Statalisters, I wish to display the means of a continuous variable for different values of a …
Compute the solution to the dual problem using LinearProgram() classHi! First of all, happy new year to everyone reading this post! I am fairly new to Mata and am usi…
Marginal effects for interaction after MlogitDear all, I'm new in this forum and also pretty new to Stata, so I don't know if my question is act…
How many variables are necessary to carry out a logistic regression?Is it possible with only 2 events in the group of exposed (n=5) and 32 in the group of non-exposed (…
Subscribe to:
Post Comments (Atom)
0 Response to loop to append multiple files and add new variable
Post a Comment