Announcement

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

  • Calculating unique add-ons per group

    Hi all,

    I have a dataset with multiple investors in different companies. Every time an investor holds a position in a company, there is an additional observation. Now I need to calculate how many different/unique investors hold a position when one investor was the first to hold a position in that company.

    I have unique panelid's so Investor A shorting company A has panelid 1. Investor B shorting company A has panel id 2 and so forth.

    I am using v. 14.1 of Stata.

    Any help would be great!

    Greetings

  • #2
    The solution to your problem will almost certainly depend on the way your data is organized, so without an example of your data it is unlikely anyone will be able to help you.

    In addition, I find your question unclear. I don't know what
    Now I need to calculate how many different/unique investors hold a position when one investor was the first to hold a position in that company.
    means. Perhaps you can post back, and along with your example data, you can show how you would calculate the solution by hand for one or two of the situations your data illustrates.

    When showing your example data, be sure to use the -dataex- command. If you are running version 15.1 or a fully updated version 14.2, it 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-.

    Comment

    Working...
    X