Programming the statistical procedures from SAS

Hausman Test

Reply
New Contributor
Posts: 2

Hausman Test

Dear all,

I am using a panel regression and want to investigate if I need Random or Fixed effects.  I read over the internet that I can use "Proc tscsreg" command with "ranone" as an option and the Hausman test will automatically be computed in the output. I did that but I got an error message saying that "tscreg" is not recognized. I think this is because I am using SAS 9.3.

So I tried to do it using "Proc Panel" with "ranone" as an option as follows:

proc panel;

ID gid pid;

model YardsMinAvgP3 = PIgP Same3 PIncP*Same3 FracPassGameIncP

  YPRGameIgP YPPGameIgP FracSuccGame Down YTG FieldPos PointDiff DiffSpreadvsActual Cold Wind Weather Grass OffHome / ranone ;

run;

I tried to run it but it takes ages, so I am not sure if I am doing something wrong.

Also, I have some of my equations have a binary dependent variable so I am using "proc logistic" command for it, but I am not sure if I can still use the Hausman test in this case!

Thank you!

Contributor
Posts: 62

Re: Hausman Test

Hi,

Your problem with Proc tscsreg is not because of SAS 9.3. May be you type it in the wrong manner.

SAS Employee
Posts: 89

Re: Hausman Test

Thanks for using the community. Let's see if I can help.

First thing is that since PANEL and TSCSREG are SAS/ETS procedures, you might have more luck posting on Forecasting and Econometrics community page. Feel free to do that in the future.

Second is that you are correct in that RANONE will produce the Hausman test for the validity of using Random Effects. BTW, this tends to be only popular in social sciences as they are the ones that tend to work most often with observational data.

The syntax for PANEL (and most SAS procedures) does not allow for continuous*continuous interaction effects in most cases.  If your data happen to be categorical, you could pull this off with a CLASS statement such as,

proc panel;

ID gid pid;

class Same3;

model YardsMinAvgP3 = PIgP Same3 PIncP*Same3 FracPassGameIncP

  YPRGameIgP YPPGameIgP FracSuccGame Down YTG FieldPos PointDiff DiffSpreadvsActual Cold Wind Weather Grass OffHome / ranone ;

run;

if they are continuous, multiply the columns in a data step.

The second part of your question concerns a nonlinear model and the Hausman test.  This test does not exist in the same way as with a linear model. My suggestion would be to simply keep going on the path you currently are and use a linear probability model.  It it is a consistent estimator of the average effect and you could certainly test the validity of the RE estimator in this environment.

The closest thing to a FE estimator in the nonlinear world is something called the Correlated Random Effects model. You can read up here. http://www.iza.org/conference_files/SUMS_2013/slides_1_linear_iza.pdf

Also, you will find sample code for PANEL here. http://support.sas.com/documentation/onlinedoc/ets/ex_code/121/index.html

Copy and paste in your code window.

Hope this helps. -Ken

Ask a Question
Discussion stats
  • 2 replies
  • 920 views
  • 1 like
  • 3 in conversation