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

Re: st: merging data sets using an interaction of demographics


From   Richard Williams <Richard.A.Williams.5@nd.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: merging data sets using an interaction of demographics
Date   Mon, 28 Feb 2005 22:11:30 -0500

At 09:40 PM 2/28/2005 -0500, Nola Ogunro wrote:
I have two data sets A and B. I have a variable in B that I can't observe in A however each data set contains common demographics from which I can create a interaction term in each data set (ie age,race,income,state) I can assign unique values to each interaction and merge the two data sets on this interaction therefore getting my varible of interest in set A. My question is that I can't get the number of observations in my merged data set to equal the number of observations in the master data set "A"(ie merge 3 contains more obervations than merge 1)

I have tried the merge many times in addition to using every possible merge command out there, any response would be appreciated
Would the -joinby- command do what you want? If not, perhaps you could give us brief excerpts from the data along with the command(s) you are using.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

*
* 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