Sample Panel Data
Year | Firm_ID | Region | Industry | ROE | ROA | Tobin_Q | ESG | Leverage | Age | Size |
---|---|---|---|---|---|---|---|---|---|---|
2012 | 1 | Asia/Pacific Rim | Oil_and_Gas_Refining_and_Marketing | 12.19 | 6.22 | 1.17 | 51.24 | 1.45 | 1.58 | 6.51 |
2013 | 1 | Asia/Pacific Rim | Oil_and_Gas_Refining_and_Marketing | 11.88 | 6.06 | 1.12 | 55.37 | 1.47 | 1.59 | 6.56 |
2014 | 1 | Asia/Pacific Rim | Oil_and_Gas_Refining_and_Marketing | 11.82 | 5.69 | 1.17 | 57.85 | 1.51 | 1.6 | 6.63 |
2015 | 1 | Asia/Pacific Rim | Oil_and_Gas_Refining_and_Marketing | 11.3 | 5.05 | 1.05 | 48.76 | 1.5 | 1.61 | 6.7 |
2016 | 1 | Asia/Pacific Rim | Oil_and_Gas_Refining_and_Marketing | 13.22 | 5.39 | 1.13 | 52.48 | 1.48 | 1.62 | 6.78 |
2017 | 1 | Asia/Pacific Rim | Oil_and_Gas_Refining_and_Marketing | 12.07 | 4.56 | 1.18 | 41.74 | 1.44 | 1.63 | 6.85 |
2018 | 1 | Asia/Pacific Rim | Oil_and_Gas_Refining_and_Marketing | 12.95 | 4.72 | 1.28 | 53.31 | 1.43 | 1.64 | 6.91 |
2019 | 1 | Asia/Pacific Rim | Oil_and_Gas_Refining_and_Marketing | 11.63 | 4.35 | 1.42 | 42.56 | 1.46 | 1.65 | 7 |
2020 | 1 | Asia/Pacific Rim | Oil_and_Gas_Refining_and_Marketing | 9.37 | 3.63 | 1.22 | 41.74 | 1.47 | 1.66 | 7.07 |
2012 | 2 | EMEA | Electric_Utilities | 14.4 | 5.95 | 1.1 | 77.27 | 1.55 | 1.11 | 4.39 |
2013 | 2 | EMEA | Electric_Utilities | 12 | 5.03 | 1.2 | 72.31 | 1.59 | 1.15 | 4.37 |
2014 | 2 | EMEA | Electric_Utilities | 30.2 | 14.1 | 1.24 | 66.53 | 1.51 | 1.18 | 4.33 |
2015 | 2 | EMEA | Electric_Utilities | 33.56 | 18.75 | 0.94 | 66.53 | 1.42 | 1.2 | 4.36 |
2016 | 2 | EMEA | Electric_Utilities | 3.65 | 2.22 | 0.98 | 67.77 | 1.37 | 1.23 | 4.34 |
2017 | 2 | EMEA | Electric_Utilities | 6.53 | 3.96 | 1.07 | 64.46 | 1.35 | 1.26 | 4.34 |
2018 | 2 | EMEA | Electric_Utilities | 6.77 | 3.82 | 1.23 | 65.7 | 1.43 | 1.28 | 4.35 |
2019 | 2 | EMEA | Electric_Utilities | 11.94 | 6.48 | 1.28 | 66.12 | 1.46 | 1.3 | 4.37 |
2020 | 2 | EMEA | Electric_Utilities | 14.06 | 4.49 | 1.08 | 57.02 | 1.27 | 1.32 | 4.76 |
2012 | 3 | Americas | Oil_and_Gas_Storage_and_Transportation | 19.13 | 6.91 | 1.89 | 11.57 | 1.65 | 1.11 | 4.56 |
2013 | 3 | Americas | Oil_and_Gas_Storage_and_Transportation | 18.29 | 6.83 | 2.17 | 12.81 | 1.64 | 1.15 | 4.6 |
2014 | 3 | Americas | Oil_and_Gas_Storage_and_Transportation | 16.75 | 6.38 | 2.1 | 12.81 | 1.66 | 1.18 | 4.67 |
2015 | 3 | Americas | Oil_and_Gas_Storage_and_Transportation | 13.15 | 5.25 | 1.64 | 14.46 | 1.66 | 1.2 | 4.69 |
2016 | 3 | Americas | Oil_and_Gas_Storage_and_Transportation | 11.87 | 4.98 | 1.67 | 19.01 | 1.66 | 1.23 | 4.72 |
2017 | 3 | Americas | Oil_and_Gas_Storage_and_Transportation | 12.55 | 5.25 | 1.64 | 19.01 | 1.65 | 1.26 | 4.74 |
2018 | 3 | Americas | Oil_and_Gas_Storage_and_Transportation | 17.98 | 7.49 | 1.52 | 28.51 | 1.66 | 1.28 | 4.76 |
2019 | 3 | Americas | Oil_and_Gas_Storage_and_Transportation | 18.89 | 7.74 | 1.6 | 34.3 | 1.66 | 1.3 | 4.79 |
2020 | 3 | Americas | Oil_and_Gas_Storage_and_Transportation | 15.37 | 6 | 1.29 | 33.88 | 1.68 | 1.32 | 4.81 |
For example, my fixed effects model is using the code:
dummyvar = lm(ROE ~ ESG + Leverage + Age +
Size + factor(Industry) + factor(Region),
data=Updated_Age_Data)
Whereby the industry and regions are the dummy variables. ROE is the dependent, ESG is my independent, and leverage, age, and size are my control variables.
How do I apply the same concept to a random effects model? Would either of these be the correct code? As I want the output to show the significance of ROE based on region and industry type.
random1 <- plm(ROE ~ ESG + Leverage + Age +
Size + Region + Industry,
index=c("Firm_ID", "Year"), model="random",
data=Updated_Age_Data)
OR
random2 <- plm(ROE ~ ESG + Leverage + Age +
Size + Industry + Region,
data=Updated_Age_Data, model="random")
List of acronyms/explanations:
- ROE = Return on Equity
- ESG - Proxy for corporate social responsbility
- ROE is my dependent variable
- ESG is my independent variable
- Age, Size and leverage are my control variables
dput
on your dataset $\endgroup$