Rao's score and adjusted Rao's score tests of linear hypotheses for spatial Durbin and spatial Durbin error models
Rao's score and adjusted Rao's score tests of linear hypotheses for spatial Durbin and spatial Durbin error models
Rao's score and adjusted Rao's score tests of linear hypotheses applied to a fitted linear model to examine whether either the spatially lagged dependent variable lag or the spatially lagged independent variable(s) WX should be included in the model, or both (SDM). Adjusted tests are provided for lag and WX adapting to the presence of the other, and a joint test for both. The joint test is equal to the unadjusted of one plus the adjusted of the other. In addition, draft tests are added from Koley (2024, section 6) for spatial Durbin error models to examine whether either the spatially lagged error err or the spatially lagged independent variable(s) WX should be included in the model, or both (SDEM); because of orthogonality, no adjusted tests are required.
SD.RStests(model, listw, zero.policy = attr(listw,"zero.policy"), test ="SDM", Durbin =TRUE)
Arguments
model: an object of class lm returned by lm
listw: a listw object created for example by nb2listw, expected to be row-standardised (W-style)
zero.policy: default attr(listw, "zero.policy") as set when listw was created, if attribute not set, use global option value; if TRUE assign zero to the lagged value of zones without neighbours, if FALSE assign NA
test: test=SDM computes the SDM tests, a character vector of tests requested chosen from SDM_RSlag, SDM_adjRSlag, SDM_RSWX, SDM_adjRSWX, SDM_Joint, test=SDEM computes the SDEM tests, a character vector of tests requested chosen from SDEM_RSerr, SDEM_RSWX, SDEM_Joint; test=all computes all the tests
Durbin: default TRUE for Durbin models including WX; if TRUE, full spatial Durbin model; if a formula object, the subset of explanatory variables to lag
Returns
A list of class LMtestlist of htest objects, each with: - statistic: the value of the Lagrange Multiplier test.
parameter: number of degrees of freedom
p.value: the p-value of the test.
method: a character string giving the method used.
data.name: a character string giving the name(s) of the data.
References
Malabika Koley and Anil K. Bera (2024) To use, or not to use the spatial Durbin model? – that is the question, Spatial Economic Analysis, 19:1, 30-56, tools:::Rd_expr_doi("10.1080/17421772.2023.2256810") ; Malabika Koley (2024) Specification Testing under General Nesting Spatial Model (Appendix C), https://sites.google.com/view/malabikakoley/research.