Hello. I have a folder with about 50 data files. I want to merge the files either on 1 or 2 variables depending on if the data contains one or both of these variables. I have to repeat this process for about 10 different folders. Therefore, I would not like to open up each file and see which merging variables the file contains.
Also it is possible that a few files may have missing observations for the merging variables and would result in stata telling me the merging variables do not uniquely identify observations. I want to avoid checking each file and deleting these missing observations.
Any suggestions would be greatly appreciated! Thanks.
Amit
Related Posts with Merging multiple files in multiple folder on different variables in a loop
Number format: only display digits if non-intengerI let STATA display summary statistics for me using esttab, as follows: Code: sysuse auto, clear …
System GMM across subsamplesHello everyone, I am using the -xtabond2- command. I am using 70 countries over a period of 14 years…
Potential bug in IVREGRESS: instruments dropped due to collinearity when they should not be droppedIn a private conversation, haiyan lin notified me of a potential bug in ivreg2. The same problem occ…
Test difference between estimated coefficientsHello, I am running a regression on two subsamples (s2=0 and s2=1). I would like to test whether th…
Monte Carlo SimulationDear All, I hope I will find someone who could help me with my question. I am having problems with …
Subscribe to:
Post Comments (Atom)
0 Response to Merging multiple files in multiple folder on different variables in a loop
Post a Comment