Description Usage Arguments Details Value Author(s) References Examples

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

1 2 3 4 5 6 7 |

`formula` |
an object of class |

`data` |
a |

`x` |
an object of class |

`listw` |
either a |

`model` |
a character value specifying the transformation to be applied to the data. |

`test` |
one of |

`index` |
either NULL (default) or a character vector to identify the indexes among the columns of the |

`...` |
additional arguments to be passed |

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).

an object of class `htest`

Giovanni Millo

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.

1 2 3 4 5 6 7 8 9 10 | ```
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")
``` |

```
Loading required package: spdep
Loading required package: sp
Loading required package: Matrix
Locally robust LM test for spatial error dependence sub spatial lag
data: formula
LM = 138.79, df = 1, p-value < 2.2e-16
alternative hypothesis: spatial error dependence
Locally robust LM test for spatial error dependence sub spatial lag
data: formula (within transformation)
LM = 94.923, df = 1, p-value < 2.2e-16
alternative hypothesis: spatial error dependence
```

splm documentation built on July 14, 2018, 9:03 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.