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

st: RE: Re: RE: matching in Stata


From   "Greg Branch" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: RE: matching in Stata
Date   Wed, 17 Sep 2003 11:55:25 -0500

Perhaps you might regress income on all the other variables you have in
dataset 1 and then generate predicted values using the resulting
coefficients for the X's in dataset 1.
Just a thought

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Oleksandr
Shepotylo
Sent: Wednesday, September 17, 2003 11:21 AM
To: [email protected]
Subject: st: Re: RE: matching in Stata


Dear Chih-Mao,

-merge is not good because even though two samples are form the same
population they have different observations and can not be matched
perfectly.

My problem can be demostrated with the following example:

Dataset1:
person   age  gender  region income
1             20    M        MD     10,000
2             45     F         CA     100,000

Dataset 2:

person     age  gender  region   income
1              23    F         DC            ?
2              35    M        TX            ?

I need program that will match people based on age gender region and
will set income in dataset2 based on closest match from 1.

Oleksandr.


----- Original Message -----
From: "Chih-Mao Hsieh" <[email protected]>
To: <[email protected]>
Sent: Wednesday, September 17, 2003 11:56 AM
Subject: st: RE: matching in Stata


> Dear Oleksandr
>
> I would imagine that -merge- is what you're looking for, maybe with a
couple -gen- commands along the way.  What is ultimately done will
depend on what you intend to do with all the "extra" observations in X2
(whether you still want to match those, or you have a rule to leave some
unmatched).
>
> Chihmao.
>
> -----Original Message-----
> From: [email protected] on behalf of Oleksandr
Shepotylo
> Sent: Wed 9/17/2003 10:01 AM
> To: [email protected]
> Cc:
> Subject: st: matching in Stata
>
>
>
> Dear Statalist,
>
>   Is there any Stata procedure that will match observations from 2
different
> datasets drawn from the same population.
>   Let's say, I have  datasets X1=(x,y) and X2=(x). I want to construct
> X2*=(x*,y) based on mathching observations with closest x's. Also, 
> since
X2
> has more observations correspondence
> should not be  1 to 1.
>
> Thanks,
>
> Oleksandr.
>
>
>
> *
> *   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/
>

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