[R-sig-Geo] SPML : help with sphtest?
Philip A. Viton
viton.1 at osu.edu
Wed May 8 17:50:51 CEST 2013
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
viton.1 at osu.edu
More information about the R-sig-Geo
mailing list