Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: Re: st: RE: Simple Data Question


From   "Alex Koltai5" <alex.j.k5@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Re: st: RE: Simple Data Question
Date   Thu, 15 Mar 2007 23:56:45 -0400

On 3/15/07, n j cox <n.j.cox@durham.ac.uk> wrote:
You know the answer really.
  Yes, and in a sense I also 'knew' that I should use "merge" since I
thought about it -- but since Stata for me is now a domain full of
uncertainty, I don't really trust my intuitions, so the advice from
you and Jason was really useful.

 Thanks again.

Alex


The issue is how
is Stata to read your mind and know that the
two variables with the same name should
really be different variables. Stata does
no mind-reading: it works on your wishes
as expressed in the data you read in.

So, if what to you are two different variables
in two different datasets have the same name,
then on a -merge- Stata will overwrite one with the other.
Thus you must -rename- at least one of the two
before you -merge-.

Nick
n.j.cox@durham.ac.uk

Alex Koltai5

Does "merge" work if the variables have the same name in the two data sets?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index