The LR.sarlm()
function provides a likelihood ratio test for objects for which a logLik()
function exists for their class, or for objects of class logLik
. LR1.sarlm()
and Wald1.sarlm()
are used internally in summary.sarlm()
, but may be accessed directly; they report the values respectively of LR and Wald tests for the absence of spatial dependence in spatial lag or error models. The spatial Hausman test is available for models fitted with errorsarlm
and GMerrorsar
.
LR.sarlm(x, y)
# S3 method for sarlm
logLik(object, ...)
LR1.sarlm(object)
Wald1.sarlm(object)
# S3 method for sarlm
Hausman.test(object, ..., tol=NULL)
# S3 method for gmsar
Hausman.test(object, ..., tol=NULL)
a logLik
object or an object for which a logLik()
function exists
a logLik
object or an object for which a logLik()
function exists
a sarlm
object from lagsarlm()
or errorsarlm()
further arguments passed to or from other methods
tol
argument passed to solve
, default NULL
The tests return objects of class htest
with:
value of statistic
degrees of freedom
Probability value
varies with test
description of test method
logLik.sarlm() returns an object of class logLik LR1.sarlm, Hausman.sarlm and Wald1.sarlm returm objects of class htest
LeSage J and RK Pace (2009) Introduction to Spatial Econometrics. CRC Press, Boca Raton, pp. 61--63; Pace RK and LeSage J (2008) A spatial Hausman test. Economics Letters 101, 282--284.
# NOT RUN {
example(columbus)
mixed <- lagsarlm(CRIME ~ HOVAL + INC, data=columbus, nb2listw(col.gal.nb),
type="mixed")
error <- errorsarlm(CRIME ~ HOVAL + INC, data=columbus, nb2listw(col.gal.nb))
LR.sarlm(mixed, error)
Hausman.test(error)
# }
Run the code above in your browser using DataLab