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
Matching Actions to YearsI have to different databases. Database 1 has executive actions in specific years, but this is not c…
preparing data for propensity score matchDear All, I want to analyze if the gain in public health insurance due to this policy (Medicaid exp…
generate a value indicating how many time a situation happens before the specific dateHello everyone in the community! Sorry to have some problems with the same data again , thanks agai…
rename variablesI am poor at Stata coding. I would like to rename from "logind1-logind84" to " logcoefstandind101, l…
Loop mixed model over a least of predictors and store the coefficients and P valuesHi, I want to loop a mixed model over a list of predictors (fixed effects) and store the coefficien…
Subscribe to:
Post Comments (Atom)
0 Response to Merging multiple files in multiple folder on different variables in a loop
Post a Comment