I'm having trouble getting the spatial Hausman test (function sphtest) in splm to work for the case where we supply a formula and the method is ML. (The example in the manual, with method=GM works fine). I keep getting a reference to a parameter spatial.error which does not seem to be covered in the Usage of this function. Can anyone see what's going wrong?

library(splm) # version 1.0-00 under MS-Win
data("Produc", package="Ecdat")
data(usaww)
usalw<-mat2listw(usaww)
fm<-log(gsp)~log(pcap)+log(pc)+log(emp)+unemp

# this seems to correspond to the Usage of sphtest
sphtest(fm,data=Produc,listw=usalw,spatial.model="lag",method="ML",errors="BSK")
  Error in match.arg(spatial.error) :
  'arg' must be NULL or a character vector

I tried a bunch of other formulations, all of which
resulted in the error concerning parameter spatial.error/

Any help gratefully received!


------------------------
Philip A. Viton
City Planning, Ohio State University
275 West Woodruff Avenue, Columbus OH 43210
[email protected]

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to