I want to create a variable which counts the total number of people on a company board per year. The difficulty is that the number changes every year. I have 20 dummy variables for every year, equaling to 1 if the person is present on board, and 0 if not present. I also have a variable id, with a unique number for every company. I can see the total board members per company when I tab id y2020. How can I create this into a variable, which counts the total number of board members, per company, for each year hence calculating Board Size?
Related Posts with Creating a New Variable from a Dummy Variable
Fixed vs. random Effects testGood day. I am finding it difficult to run the xtoverid test as a result of my i.# interaction term…
Same or different order differencing in OLS regression.Dear all, Can one difference some explanatory variables but not the others? Or if one explanatory v…
How to identify who ever worksDear all, I have a 4-wave panel data and I want to identify individuals who ever work, i.e. someone…
Panel Data SetHello, I have a a bunch of datasets with paneldata with variables for all companies from the S&…
Reproducing outputs from finite mixture model user written package in Stata 16Hello, I am working with someone else's code applying a fmm. The below code shows an example f outp…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a New Variable from a Dummy Variable
Post a Comment