Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: help merge


From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: help merge
Date   Mon, 08 Sep 2003 17:51:58 -0400

At 02:23 PM 9/8/2003 -0700, Ritesh Mistry wrote:
i have a simple problem about merging datasets.

i would like to add variables to analytic.dta from master.dta.

analytic.dta contains a subset of variables from master.dta. both datasets
have the same observations.  how do i add a specific set of variables from
master.dta to analytic.dta? i don't want to merge all the data, only certain
variables.

i'd appreciate any help. thanks!
What you want is...
merge varlist1 using master, keep( varlist2 )

where varlist2 is the set of variables that you want to take from master.
varlist 1 is the set of key variables.

I hope this is helps.
-- David

David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]
410-516-5404

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index