Announcement

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

  • creating a new variable in panel data.

    I got a panel data of the information of 1000 firms' board of directors for 5 years, which includes cusip, gveky, company name, year, director ID, female? (dummy), female%, and boardsize. I need to use the information to create a new variable: "fraction of male directors on the board who sit on other boards with at least one female director", how can I create the variable and what kind of code can I use? Thanks.

  • #2
    Even the best descriptions of data are no substitute for an actual example of the data. This problem is sufficiently complex that whoever helps you will want to be able to test their code in an example of your data.

    To show data examples, please 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