Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Matching Data

    Hi Everyone,

    I’m very new to STATA and would really appreciate some help – please be as detailed as you can.

    I have four datasets:

    1) Annual CEO compensation data

    2) Daily Share Price data

    3) Quarterly Financial information

    4) CEO characteristics

    This would be an unbalanced panel.

    What is the best way to match this data in order to run a regression?

  • #2
    Hi Chris and welcome to Statalist!

    You've asked a pretty broad question, and a lot is going to depend on:
    (a) what you want the final dataset to look like and
    (b) what are the common identifiers across the various datasets (that you can use to match or merge on).

    1) I presume (correct me if I'm wrong) that it will be fairly easy to match the CEO info in #1 and #4 (i.e. that there will be some CEO_id or firm_id (of the company they are CEO of) so that you can match individuals between the 2 datasets. If you have to match on name, and one has "Bill Gates" and the other "William Henry Gates III" (Bill Gates' full name), that is more difficult.

    2) Do you have a way of matching the firm in #3 to the CEO?

    3) Finally, if the daily financial data is from CRSP and the quarterly financial is from COMPUSTAT, then see the following links:

    Comment


    • #3
      I doubt anybody can give you specific advice without seeing examples of each of the four data sets. At the general level, it is likely that the key will be the use of the -merge- command, but the details will depend on the organizatin of the data in each of the data sets. And it is possible some of the data sets will need extensive reworking to make them compatible before they can be -merge-d.

      Once you have separately imported each of these data sets into Stata, use the -dataex- command to post back with a brief excerpt of the data from each. Try to show some observations from each data set that will match up with observations in the other data sets. If you do that, specific advice will likely be forthcoming.

      If you are running version 15.1 or a fully updated version 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

      When asking for help with code, always show example data. When showing example data, always use -dataex-.

      Added: Crossed with #2.

      Comment

      Working...
      X