I have a panel data set of 4500 firms for the years 2000 - 2017 (around 42,000 firm-year observations) a sample of which is shown below from Excel. I apologize as I do not currently have access to Stata from home.
I would like to use a panel regression to test the effects of my diversity index on annual risk including controlled variables and year and industry effects.
Array
I used the following codes to perform the regression analysis but am not sure whether this is the right way to perform it. Any advice or feedback is highly appreciated!
xtset permco YEAR
xtreg annualized_risk diversity_Index controls i.YEAR i.industry, fe robust cluster (permco)
I performed a Hausman test using the following codes which gave a P value given 0.000 suggesting the use of a fixed effects model.
xtreg annualized_risk diversity_Index controls i.YEAR i.industry, fe
estimates store fe
xtreg annualized_risk diversity_Index controls i.YEAR i.industry, re
estimates store re
estimates store re
hausman fe re
I also tested for serial autocorrelation using the xtserial code which gave a p-value of 0.000 and tested for heteroskedasticity using the xttest 3 code which also gave a p-value of 0.000 suggesting the presence of both cases. Unfortunately the xttest2 code gave an error that there are not enough observations per panel to perform the test. As such, I included the robust and cluster(permco) options which I believe can be used to accommodate for these cases (please correct me if I'm mistaken).
Finally, I winsorized all variables at the 1st and 99th percentile level due to the presence of extreme observations using the:
winsor 2 varname, cuts(1,99) by (YEAR) code.
Are there any other tests that should be performed or are the current tests performed adequate and are the main codes in the right form for my analysis?
Thank you!
0 Response to What tests to perform on a Panel Data set?
Post a Comment