Google HAUSMAN test gives following. You may like to look at the colored PROCs:
Date: Fri, 19 Nov 2004 11:07:51 -0800 Reply-To: cassell.david@EPAMAIL.EPA.GOV Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> From: "David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV> Subject: Re: Hausman test for random effect assumptions In-Reply-To: <21d8a6de.0411190040.2e2d84a2@posting.google.com> Content-type: text/plain; charset=US-ASCII Tracy Li <lisiqi77@YAHOO.COM> wrote: > I have an unbalanced panel data with 100 countries and 12 years. > Originally I consider treating year as fixed and country as random. > According to Hsiao's book about panel data, GLS estimator is only > consistent when two assumptions are met. He suggests the Hausman > specification test for this. The test compares the coefficients from a > fixed ("covariance") model to those from a random model ("GLS"). > > I am using proc mixed but could not find any way to do the test in > SAS. Do I need to use macro? Please help.
First off, I suppose you could do this via PROC MIXED, but you really have SAS/ETS situation here. You need to do time series modeling of (what may be) panel data.
Once you consider that, then the solution becomes simpler. If you do your work in PROC MODEL, then you can get Hausman's specification test for free. All you have to do is include the option HAUSMAN in the FIT statement. Then you get a comparison of your fitting methods using Hausman's m-statistic. Similarly, if you find that PROC TSCSREG handles your panel data properly, then you can use Hausman's test in it. I don't know of any other SAS procs which automatically do Hausman's test, but there may be more.
Before you go much farther though, I would recommend that you look further into the Hausman test. R.C. Fair ("Specification, Estimation, and Analysis of Macroeconometric Models", 1984) has a discussion on why Hausman's test fails for a number of popular econometric models. So beware. As the old Latin statisticians said, _caveat_utor_.
HTH, David -- David Cassell, CSC Cassell.David@epa.gov Senior computing specialist mathematical statistician