Hausman specification test for spatial panel data models
sphtest(x,...)## S3 method for class 'formula'sphtest(x, data, index =NULL, listw, spatial.model = c("lag","error","sarar"), method = c("ML","GM"), errors = c("KKP","BSK"),...)## S3 method for class 'splm'sphtest(x, x2,...)
Arguments
x: an object of class formula or splm
x2: an object of class splm
data: an object of class data.frame or pdata.frame. An optional data frame containing the variables in the model. When the obect is a data.frame, the first two columns may contain the indexes. See index
index: if not NULL (default), a character vector to identify the indexes among the columns of the data.frame
listw: an object of class listw created for example by spdep::nb2listw
spatial.model: one of c("lag","error","sarar"), the model to be estimated (only lag, only error, both lag and error dependence)
method: one of c("ML","GM")
errors: one of c("BSK","KPP"). When method is "ML" defines the specification of the innovations
...: additional arguments to be passed
Returns
an object of class htest
References
Millo, G., Piras, G. (2012) splm: Spatial Panel Data Models in R. Journal of Statistical Software, 47(1) , 1--38. URL http://www.jstatsoft.org/v47/i01/.