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

st: St: re merging two datasets


From   Pamela Meadows <[email protected]>
To   [email protected]
Subject   st: St: re merging two datasets
Date   Mon, 1 Sep 2003 12:13:54 +0100 (BST)

Michael
If you only want the income variable from the B
dataset, you need to create a temporary C dataset
which is a subset of the B dataset

use B
keep city income
save as C


You then sort this new C dataset on city, sort the A
datset on city and follow Michael Blasnik's
suggestion. You then save this new merged dataset as
some variant of A. You can then delete the C datset if
you wish.(I only mention this because I tend not to do
this and have messy little data sub-sets littering my
data folders.)


Pamela Meadows


> Date: Sun, 31 Aug 2003 16:08:54 -0400 (EDT)
> From: Michael Horowitz <[email protected]>
> Subject: st: Question about merging two datasets
> 
> I have a problem that I was wondering if someone out
> there could help me
> with. I have two datasets.  Lets call them dataset A
> and dataset B.
> Dataset A contains contains two variables, <city>
> and <income>.  Dataset B
> also contains two variables, <city> and <income>. 
> Dataset A is much
> larger than Dataset B and the data in Dataset B is
> more accurate than the
> data in Dataset A.  Specifically, the income levels
> for 
=== message truncated === 


________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
*
*   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