[R-sig-Geo] Spatial Hausman Test for Maximum Likelihood estimated models

Terry Griffin tgriffin at uaex.edu
Thu Sep 15 22:53:18 CEST 2011



----- Original Message -----
> From: "Rafael Terra" <rflterra at yahoo.com.br>
> To: r-sig-geo at 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
> email: rflterra at yahoo.com.br
> 
> 	[[alternative HTML version deleted]]
> 
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list