Вы находитесь на странице: 1из 4

Implementation Steps: (I am using the example for appendix 5 .

text file: Appendix 5 - Industrial)

Step 1: Generate/Run the results for the Fixed Effects Regression

Command: xtreg depvar indepvar1 indepvar2 indepvar3, fe

In this case we will use the command: xtreg stockreturns infrate marrisk intrate excrate msinmillions
profitabilityinmillions lev comgro marketvalinbillions firmsize, fe

Step 2: Store the results of the fixed effects model into Stata’s system. In this case, use the command:
estimates store fix1

Step 3: Generate/Run the results for the Fixed Effects Regression

Command: xtreg depvar indepvar1 indepvar2 indepvar3, re

In this case, we will use the command: xtreg stockreturns infrate marrisk intrate excrate msinmillions
profitabilityinmillions lev comgro marketvalinbillions firmsize, re
Step 4: Store the results of the random effects model into Stata’s system. In this case, use the command:
estimates store ran1

Step 5: Run the hausman test using the code: hausman fix1 ran1

Note1: The hausman test will test which is a better model between the fixed effects and random effects.
If the probability value of the hausman test is greater than 0.05, this means that random effects is better
than the fixed effects model.

Note2: If the hausman test does not work, please proceed to the Breusch and Pagan Lagrangian Multiplier
Test (BPLM) to test for OLS vs Random Effects

Step 6: Compare random effects model vs the ordinary least squares regression model (OLS or pooled
OLS)
Step 6a: Re-run the Random effects model using the command: xtreg stockreturns infrate marrisk intrate
excrate msinmillions profitabilityinmillions lev comgro marketvalinbillions firmsize, re

Step 6b: Use the Breusch and Pagan Lagrangian Multiplier Test for Random Effects by using the command
xttest0

*Note that the Breusch and Pagan Lagrangian Multiplier Test for Random Effects is a test that will compare
which is better between Random Effects and Pooled OLS.

If the probability in the BPLM test is greater than 0.05, this implies that the Pooled OLS is better than the
Random effects model. But if the probability of the BPLM test is less than 0.05, this implies that the
random effects is better than the fixed effects model.

In this case, the results of the BPLM test is:

We can see that the probability value of the BPLM test is equal to 1.000, which is greater than 0.05. This
means that the Pooled OLS is better than the Random effects model. Thus, we will need to run the Pooled
OLS.

Note: If Random effects is better than pooled OLS, we do not need to run the Pooled OLS anymore, since
we do not need the results any longer.

Step 7: Run the pooled OLS model using the command: reg depvar indepvar1 indepvar2 indepvar3

In this case, we shall use the command: reg stockreturns infrate marrisk intrate excrate msinmillions
profitabilityinmillions lev comgro marketvalinbillions firmsize
Step 8: Test the pooled OLS model if there exists heteroskedasticity, using the Breusch-Pagan test for
heteroskedasticity. In this case, the command is hettest

Note1: If the probability value in the hettest is less than 0.05, this implies that heteroskedasticity exists,
and we will need to correct it. (If greater than 0.05, it means homoscedastic).

Note2: Heteroskedasticity means that the variance is not constant, and this is a violation of the OLS
assumptions – it needs to be homoscedastic to not violate OLS.

Note3: Let’s assume that the model is heteroskedastic, in order to correct it, we will use the “robust”
function” Command: reg depvar indepvar1 indepvar2 indepvar3, robust

In this case: reg stockreturns infrate marrisk intrate excrate msinmillions profitabilityinmillions lev comgro
marketvalinbillions firmsize, robust

But since our model is homoscedastic, we do not need to do the above step.

Вам также может понравиться