slmtest: Locally robust panel Lagrange Multiplier tests for spatial...

slmtestR Documentation

Locally robust panel Lagrange Multiplier tests for spatial dependence

Description

Locally robust LM tests for spatial lag (error) correlation sub spatial error (lag) correlation in panel models

Usage

slmtest(x,...)
## S3 method for class 'formula'
slmtest(formula, data, listw, model="pooling",
 test=c("lme","lml","rlme","rlml"), index=NULL, ...)
## S3 method for class 'plm'
slmtest(x, listw,
 test=c("lme","lml","rlme","rlml"), ...)

Arguments

formula

an object of class formula

data

a data.frame or pdata.frame containing the variables in the model

x

an object of class plm

listw

either a matrix or a listw representing the spatial structure

model

a character value specifying the transformation to be applied to the data.

test

one of c("lme","lml","rlme","rlml"), the test to be performed.

index

either NULL (default) or a character vector to identify the indexes among the columns of the data.frame

...

additional arguments to be passed

Details

This tests are panel versions of the locally robust LM tests of Anselin et al. (1996), based on a pooling assumption: i.e., they do not allow for any kind of individual effect. Therefore it is advisable to employ a within transformation whenever individual effects cannot be ruled out.

It must be kept in mind that these locally robust procedures have been designed for situations in which the "other" effect is not of substantial magnitude, and can behave suboptimally otherwise.

Four tests are available to be chosen through the test argument: "lml" for "LM lag" and, respectively, "lme" for "LM error" are the standard, non-robust versions, obtained simply pooling the cross-sectional versions; "rlml" and "rlme" are, respectively, the locally robust test for lag, allowing for a spatial error; and for error, allowing for a spatial lag.

The model argument, specified according to the standards of plm, is passed on internally and employed to determine the panel data transformation to be applied before calculating the test. Defaults to "pooling" (no transformation).

Value

an object of class htest

Author(s)

Giovanni Millo

References

Anselin, L., Bera, A.K., Florax, R. and Yoon, M.J. (1996) Simple diagnostic tests for spatial dependence. Regional Science and Urban Economics, 26(1), 77-104. Elhorst, J.P. (2014) Spatial Panel data Models, in Spatial Econometrics (Springer) 37-93.

Examples

data(Produc, package="plm")
data(usaww)
fm <- log(gsp)~log(pcap)+log(pc)+log(emp)+unemp
## robust LM test for spatial error sub spatial lag
## model on original data, pooling hypothesis
slmtest(fm, data=Produc, listw = usaww, test="rlme")
## model on within-transformed (time-demeaned) data,
## eliminates individual effects
slmtest(fm, data=Produc, listw = usaww, test="rlme",
  model="within")

splm documentation built on July 26, 2023, 5:44 p.m.

Related to slmtest in splm...