Announcement

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

  • Add horizontal lines (collapse without deleting)

    Hello,

    I try to merge the ownership data of specific institutional investors in my data. For example, I would like to combine certain institutional investor's shares for each quarter and holding company. Therefore, the new variables should be added horizontally and only the variables "shared," "sole," "no" should be summarized, and the string variables should not be "merged."

    I use STATA 16
    The data (exemplary) looks like this:

    fdate mgrname country cusip_numb shares sole shared no stkname shrouts
    31mar2015 11386 BLACKROCK ADVISORS UNITED STATES 94106L10 215494 2154940 215494WASTE MANAGEMENT INC 4.45e+08
    31mar2015 12588 BLACKROCK ASSET MGMT IRELAND 94106L10 837515 837515 0 WASTE MANAGEMENT INC 4.45e+08

    Thanks in advance!

    Best,
    Thomas

  • #2
    You can always use the merge command to combine your collapse results with your original data.

    Comment


    • #3
      Hi William,

      Thank you for your answer. However, I am new to STATA, and I am not quite sure how to implement this in a code... As mentioned above, I try only to add the ownership shares together. So the outstanding shares, as well as the string variables, should remain in the merged values. Afterward, I aim to delete the combined holdings of the investor (despite the merged holdings).

      Kind regards,
      Thomas

      Comment

      Working...
      X