Meet the Other Phone. Flexible and made to last.

Meet the Other Phone.
Flexible and made to last.

Buy now

Please or to access all these features

Geeky stuff

Does anyone know how to merge files in Stata?

3 replies

takewhatyoucan · 27/03/2011 18:16

Hello all,

I know this is a very long shot.. but, I am trying to do some data analysis using Stata. I need to merge two data files. Previously I managed to do this, but now cannot make the files merge.

Google has some suggestions, none have worked. I thought, with luck and a fair wind, a MNer might be able to shed some light.

I have been using "merge id using "
The error message is "_merge already defined"

What does it mean????????

Any help greatly appreciated! Thanks for reading

OP posts:
mranchovy · 27/03/2011 21:28

drop _merge

according to Google - never used it myself Grin

merryberry · 27/03/2011 21:34

or rename _merge as mergeOLD or similoar i recall.
stata thinks its done the job before. as part of that it has calculated an output in the code called merge which would tell you how well each file matched. so it can't do a merge again. hence drop merge or rename merge mergeOLD. and then merge again. sorry i can't help more, haven't used stata iin a couple of years.

takewhatyoucan · 28/03/2011 11:48

You legends!! Thank you both, I will try these. I did notice the _merge variable had been generated, but the list of variables from the new file have NOT been added to the main file. Power through!

OP posts:
New posts on this thread. Refresh page