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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 441 views
  • 2 likes
  • 3 in conversation