Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: data matching


From   Joseph McDonnell <[email protected]>
To   [email protected]
Subject   Re: st: data matching
Date   Wed, 1 Apr 2009 12:31:51 +0930

Joshua

you didn't say how big your files are. If they are not too big, you
could form a cross-product (which can be mighty big) and eliminate all
pairs which don't satisfy your criterion.

. use file1
. cross using file2
. drop if abs(beta1-beta2)>tolerance

Be aware that there will be duplicates in terms of IDs, but you seem
to want a list of "similar" firms and not a one-to-one match,so you
could eliminate such duplicates. You'd also need to check that no firm
in the smaller list was unmatched.

Hope this helps.

Joseph

On Wed, Apr 1, 2009 at 6:29 AM, Joshua A Shindell <[email protected]> wrote:
> Hello Everyone,
>
> I have a set of financial data on publicly traded firms.  This data is separated into two categories, and one contains about three times the observations.  I am looking for a method to select all of the observations in the larger category that are similar to the smaller category in terms of one attribute, a given firms stock Beta.  Essentially, I am hoping to select a subset of observations from the larger group such that the distribution of this variable is similar for both groups.
>
> Thank you for any suggestions,
>
> Joshua A. Shindell
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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