From the course: Advanced and Specialized Statistics with Stata

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

The Hausman test demo

The Hausman test demo - Stata Tutorial

From the course: Advanced and Specialized Statistics with Stata

Start my 1-month free trial

The Hausman test demo

- Here we are, and I've already loaded up the analyst work panel data. And, I've set it to Panel data using the XTSET command. I've also pre-specified a fixed effects regression, which regresses log wages against age, college graduation, and union membership. Let's go ahead and estimate this regression. So, here we can see the output. The next step is to store these estimates, and we can do that by calling the estimates store command. Estimates store. We need to give these estimates a name, so lets call them F.E. Okay, our estimates are now stored. The next step is to repeat this process but for the random effects model, so lets go ahead, and do that. Lets copy this code, and replace this too. Random effects, and we're going to store these estimates as R.E. Great, we now have both the fixed effects and the random effects estimates stored. Next, we can use the Hausman command to compare both sets of results.…

Contents