Hello,
I am struggling with the following task that already kept me bugging for hours.
This is the process step by step:
1. Import individual file (names: file2002, file2004, file2006, file2008, file2010)
2. Keep only the variables: id aa001_* aa004_* ba016_* ca001_* ea104_* eb001_* eb002_* ec023_* eh041_*. * should be replaced with 2002, 2004, 2006, 2008, 2010.
3. Join files on the first file using the id variable as key
Having spent more than 5 hours now, I didn't get far. The main problem involves the joining of multiple files. Is there a possibility to perform this task using simple code? I can imagine that there's are fairly frequently performed operations.
Thank you very much.
Sincerely,
Simon
Related Posts with Loop to open, keep variables, and join different files
Generating weighted averages for subgroupsDear all, I am currently working with a country year panel dataset, which has the following variabl…
Latent Class Analysis - Is it possible to run ANOVA or Chi-test in STATA after LCA?Hi everyone, I have been trying to conduct an ANOVA or Chi-test to examine whether certain variable…
String variable with nonnumeric and numeric categoriesI have a string variable with 3 categories (0,1,NA). I would like to desiring the variable, and chan…
Accessing temporary file produced by -crtrees- in mataHi, I am trying to access a temporary file (matatrees) produced by the -crtrees- command in stata. …
Creating new variable with countsI'm using a dataset with 6 variables measuring different complications a participant could have had.…
Subscribe to:
Post Comments (Atom)
0 Response to Loop to open, keep variables, and join different files
Post a Comment