Announcement

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

  • RECLINK with several variables

    Hi all,

    I am trying to match two dataset whoich do not share any common numeric variable. Company name is important in this matching.
    The first dataset has ID1, YEAR, COMPANY NAME, STATE and other variables. But some years for some ID1 are missing.
    The second dataset(COMPUSTAT) has ID2, YEAR(from birth to some point), COMPANY NAME, and other variables.

    Last time, I just generated a new ID for each of them: bid for the first one and gid for the second one.
    And then, I did this command below but I found several ridiculous mismatching such as mismatched state, year...
    : reclink cmpy using compustat_claned_test2.dta, gen(recscore) idm(bid) idu(gid)

    I need some help.

    Sang-min

    <<The first dataset>>

    +---------------------------------------------------------------------------------+
    | year newid cmpy statef~s prof tech profip techip |
    |---------------------------------------------------------------------------------|
    1. | 1982 6 3ELAELECT 36 4 2 4 2 |
    2. | 1979 7 3M 6 850 0 850 0 |
    3. | 1980 7 3M 6 . . 850 0 |
    4. | 1981 7 3M 6 . . 850 0 |
    5. | 1982 7 3M 6 850 0 850 0 |
    |---------------------------------------------------------------------------------|
    6. | 1983 7 3M 6 . . 732 1.5714286 |
    7. | 1984 7 3M 6 . . 614 3.1428571 |
    8. | 1985 7 3M 6 . . 496 4.7142857 |
    9. | 1986 7 3M 6 . . 378 6.2857143 |
    10. | 1987 7 3M 6 . . 260 7.8571429 |
    |---------------------------------------------------------------------------------|
    11. | 1988 7 3M 6 . . 142 9.4285714 |
    12. | 1989 7 3M 6 24 11 24 11 |
    13. | 1990 7 3M 6 . . 24 11 |
    14. | 1991 7 3M 6 . . 24 11 |
    15. | 1992 7 3M 6 24 11 24 11 |
    |---------------------------------------------------------------------------------|
    16. | 1993 7 3M 6 . . 24 11 |
    17. | 1994 7 3M 6 . . 24 11 |
    18. | 1995 7 3M 6 24 11 24 11 |
    19. | 1996 7 3M 6 . . 24 11 |
    20. | 1997 7 3M 6 . . 24 11 |
    |---------------------------------------------------------------------------------|
    21. | 1998 7 3M 6 24 11 24 11 |
    22. | 1979 7 3M 27 4000 0 4000 0 |
    23. | 1980 7 3M 27 . . 4333.3333 0 |
    24. | 1981 7 3M 27 . . 4666.6667 0 |
    25. | 1982 7 3M 27 5000 0 5000 0 |
    |---------------------------------------------------------------------------------|
    26. | 1983 7 3M 27 . . 5300 0 |
    27. | 1984 7 3M 27 . . 5600 0 |
    28. | 1985 7 3M 27 . . 5900 0 |
    29. | 1986 7 3M 27 6200 0 6200 0 |
    30. | 1987 7 3M 27 . . 6533.3333 0 |
    |---------------------------------------------------------------------------------|
    31. | 1988 7 3M 27 . . 6866.6667 0 |
    32. | 1989 7 3M 27 7200 0 7200 0 |
    33. | 1990 7 3M 27 . . 7250 666.66667 |
    34. | 1991 7 3M 27 . . 7300 1333.3333 |
    35. | 1992 7 3M 27 7350 2000 7350 2000 |
    |---------------------------------------------------------------------------------|
    36. | 1993 7 3M 27 . . 7800 2000 |
    37. | 1994 7 3M 27 . . 8250 2000 |
    38. | 1995 7 3M 27 8700 2000 8700 2000 |
    39. | 1996 7 3M 27 . . 8700 2000 |
    40. | 1997 7 3M 27 . . 8700 2000 |
    |---------------------------------------------------------------------------------|
    41. | 1998 7 3M 27 8700 2000 8700 2000 |
    42. | 1986 7 3M 48 225 0 225 0 |
    43. | 1987 7 3M 48 . . 225 0 |
    44. | 1988 7 3M 48 . . 225 0 |
    45. | 1989 7 3M 48 225 0 225 0 |
    |---------------------------------------------------------------------------------|
    46. | 1990 7 3M 48 . . 353 68 |
    47. | 1991 7 3M 48 . . 481 136 |
    48. | 1992 7 3M 48 609 204 609 204 |
    49. | 1993 7 3M 48 . . 609 204 |
    50. | 1994 7 3M 48 . . 609 204 |
    +------------------------------------

    <<The second dataset>>

    gvkey year cmpy at state ..................
    1000 1961 AEPLASTIKPAK . CA
    1000 1962 AEPLASTIKPAK . CA
    1000 1963 AEPLASTIKPAK . CA
    1000 1964 AEPLASTIKPAK 1.416 CA
    1000 1965 AEPLASTIKPAK 2.31 CA
    1000 1966 AEPLASTIKPAK 2.43 CA
    1000 1967 AEPLASTIKPAK 2.456 CA
    1000 1968 AEPLASTIKPAK 5.922 CA
    1000 1969 AEPLASTIKPAK 28.712 CA
    1000 1970 AEPLASTIKPAK 33.45 CA
    1000 1971 AEPLASTIKPAK 29.33 CA
    1000 1972 AEPLASTIKPAK 19.907 CA
    1000 1973 AEPLASTIKPAK 21.771 CA
    1000 1974 AEPLASTIKPAK 25.638 CA
    1000 1975 AEPLASTIKPAK 23.905 CA
    1000 1976 AEPLASTIKPAK 38.586 CA
    1000 1977 AEPLASTIKPAK 44.025 CA
    1001 1978 AMFOODSERV . OK
    1001 1979 AMFOODSERV . OK
    1001 1980 AMFOODSERV . OK

Working...
X