




Hi Terry,

Indeed, when I said "best" I meant "more adequate", i.e. if the difference among the coefficients of both models is statistically significant, then the fixed effects model is more adequate since it is the consitent model, if the difference is not significant, then random effects model is more adequate since it is the efficient model. 

Thank you 

Rafael Terra
PhD Candidate in Economics - Sao Paulo School of Economics
Sao Paulo, Brazil
email: rflterra@yahoo.com.br


________________________________
De: Terry Griffin <tgriffin@uaex.edu>

Cc: r-sig-geo@r-project.org
Enviadas: Quinta-feira, 15 de Setembro de 2011 17:53
Assunto: Re: [R-sig-Geo] Spatial Hausman Test for Maximum Likelihood estimated models



----- Original Message -----

> To: r-sig-geo@r-project.org
> Sent: Thursday, September 15, 2011 3:00:43 PM
>
 Subject: [R-sig-Geo] Spatial Hausman Test for Maximum Likelihood estimated    models
>
> Dear R users,
>
>
> I have a Panel data and I've just estimated spatial fixed and random
> effects models by Maximum likelihood using splm library. Having the
> estimates for both models,� now I must decide which one is better.
> I've looked around and I found a Spatial Hausman Test implemented
> under the name of sphtest in R. But I'm not sure you can use� it for
> Maximum likelihood estimated models. Does anyone knows hoe to
> perform this test for ML estimated models? I tried

I am not familiar with the splm library but think if you are attempting to "decide which one is better" then AIC would be the metric of choice

The spatial Hausman test is used to determine if there is significant differences between coefficients from the two models, not necessarily which model
 is 'best'

>
> sarre10307<- spml(formula=basic, data=panel0307,
> index=c("GEOCODIG_M","ano"), listw=nlist0307, model ="random",�
> effect =c("individual"),� lag=TRUE, method="eigen",
> spatial.error="none")
> sarfe10307<- spml(formula=basic, data=panel0307,
> index=c("GEOCODIG_M","ano"), listw=nlist0307, model ="within",�
> effect =c("individual"),� lag=TRUE, method="eigen",
> spatial.error="none")
>
> and then
> test2<-sphtest(sarre10307, sarfe10307)
> Error in if (x$ef.sph == x2$ef.sph) stop("Effects should be
> different") :
> � argument is of length zero
>
> My dataset is reasonably large, so I apologize for not making the
> data available so you can reproduce the problem. If� necessary I can
> reduce my dataset and post it.
>
> Thank you so much!
> Rafael Terra
> PhD Candidate in
 Economics - Sao Paulo School of Economics
> Sao Paulo, Brazil

>
>     [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
	[[alternative HTML version deleted]]

