BookmarkSubscribeRSS Feed
sasphd
Lapis Lazuli | Level 10

Hello, 

I have panel data and I want to perform hausman test to know if I should random or fixed effect model.

which proc I sould use for the test. 

I know that proc panel perform such test but only if I specify ranone or rantwo in the model statement. 

However I wonder if there is any proc that only do the test directly to advice for the best model. 

thanks, 

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

 

I have moved your post to the "SAS Forecasting and Econometrics" - board !

 

For Hausman specification test , see :

Usage Note 30333: FASTats: Frequently Asked-For Statistics
https://support.sas.com/kb/30/333.html

... and search for "hausman".

 

Hausman specification test
HAUSMAN option in the FIT statement in SAS/ETS PROC MODEL. The Hausman test for the IIA (Independence of Irrelevant Alternatives) assumption can be performed using %IIA macro available in the PROC MDC documentation example Hausman's Specification and Likelihood Ratio Tests.

Koen

SASCom1
SAS Employee

Hi @sasphd ,

 

The Hausman test statistic comparing random effects and fixed effects with panel data, is computed using parameters estimates and their covariance matrix estimates from both random effects model estimates and fixed effects model estimates. So you get this test directly when you specify a random effects model in the procedure. In computing this test statistic, the procedure also needs to estimate the corresponding fixed effects model internally to obtain parameter estimates and their covariance matrix estimates, then compute the Hausman test statistic using the formula discussed here:

 

Tests for Random effects 

 

In other words, you will need to estimate both random effects model and the corresponding fixed effects model in order to compute the Hausman test comparing these two estimators.

 

I hope this helps.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 879 views
  • 2 likes
  • 3 in conversation