Dear researchers,
I have unbalanced panel data for more than 200 firms for the period that extend from 2000 to 2015. In specific year, set of standards have been issued. Firms, accordingly, have started to adopt the standards. I have noticed that the adoption is not simultaneous. For instance, firm A adopted in 2009, firm B adopted in 2010, firm C adopted in 2013, and so on. I have used the following codes:
Code:
xtreg ChangeinNI Size Growth Leverage i.Year if Event==0, fe
xtreg ChangeinNI Size Growth Leverage i.Year if Event==1, fe
Where
Event = 0 for the firm-year observations before the adoption of the standards.
Event = 1 for the firm-year observations after the adoption of the standards.
Then, I wanted to get the residuals for each mentioned-above code, by using the following codes:
Code:
predict resid, resid
predict resid1, resid
Then, I wanted to get the standard deviation of the residuals by using the below codes:
Code:
egen SD= sd(resid)
egen SD1= sd( resid1 )
And, I want to apply the Levene’s test to test differences in standard deviation for the two residuals that I have obtained from the above, but what is the code for it?

Many thanks in advance.