Hey everyone,
I am currently working on an event study with a panel data set. For the calculation of my regression analysis I am using Stata 16.1. With my current knowledge, I cannot get any further with the creation of one specific control variable.
The control variable "Industry Performance" is operationalized as the median firm performance— also computed as a composite measure of market-to-book value and ROA—in the focal firm’s primary industry (SIC2 digit).
A quick look at my data:
Since my panel data set is really huge i couldnt use dataex, but i will briefly explain my current data structure with the below table:
Since I'm using a panel dataset, the first thing I have to keep in mind when determining the control variable is that we don't have 2009 financial datas, so I would actually use bysort ds_code before generating the new var.
Furthermore since i wanna control fpr industry i would use by industry_SIC.
My first attempt looks like this:
by industry_SIC ds_code, sort: egen total = total(tobinq1)
by industry_SIC ds_code: gen avg_tobinq1 = (total-tobinq1)/(_N-1)
However, I believe that my approach is wrong and would accordingly be very happy about advice!
Best regards,
Lukas
I am currently working on an event study with a panel data set. For the calculation of my regression analysis I am using Stata 16.1. With my current knowledge, I cannot get any further with the creation of one specific control variable.
The control variable "Industry Performance" is operationalized as the median firm performance— also computed as a composite measure of market-to-book value and ROA—in the focal firm’s primary industry (SIC2 digit).
A quick look at my data:
Since my panel data set is really huge i couldnt use dataex, but i will briefly explain my current data structure with the below table:
year | ds_code | industry_SIC | ROA | Tobinq1 |
2010 | 111 | Construction | -64.3255 | 23.32 |
2011 | 111 | Construction | -104.3255 | 32.13 |
2012 | 111 | Construction | -84.3255 | 21.31 |
2013 | 111 | Construction | 24.3255 | 45.36 |
2014 | 111 | Construction | 33.3255 | 56.46545 |
2010 | 222 | Mining | 23 | 23.231312 |
2011 | 222 | Mining | 323 | -45.231 |
2012 | 222 | Mining | 44 | 23.231312 |
2013 | 222 | Mining | 44 | 23.231312 |
2014 | 222 | Mining | 55 | 23.231312 |
2010 | 333 | Construction | -33.56767 | 23.231312 |
2011 | 333 | Construction | -12.2445 | -45.231 |
2012 | 333 | Construction | -33.23123 | -55.231 |
2013 | 333 | Construction | 12.3323 | 23.231312 |
Furthermore since i wanna control fpr industry i would use by industry_SIC.
My first attempt looks like this:
by industry_SIC ds_code, sort: egen total = total(tobinq1)
by industry_SIC ds_code: gen avg_tobinq1 = (total-tobinq1)/(_N-1)
However, I believe that my approach is wrong and would accordingly be very happy about advice!
Best regards,
Lukas