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
stataHello I have the household code, the ratio of household members to the guardian and the age of the h…
Moderation of time (count analysis vs survival regression)Hello everyone, I am struggling with the correct interpretation of an interactive term (the moderat…
Problem manipulating large database based on conditional statements to eliminate specific observationsHello world of stats and analysis, I have dibbled a bit in STATA over my university years but my wo…
Grouping observationsHello community this my first post. I'm a SAS user, new to STATA, require it for my graduate progra…
How to create an indicator of total vocabulary score for bilingual childrenHi all, I am using a dataset with vocabulary data for 5585 children who are 2 years old. We have a…
Subscribe to:
Post Comments (Atom)
0 Response to loop to append multiple files and add new variable
Post a Comment