bsktest: Baltagi, Song and Koh LM test for spatial panels

Description Usage Arguments Value Author(s) References See Also Examples

Description

Baltagi, Song and Koh marginal or conditional LM test for spatial error correlation or random effects in panel models

Usage

1
2
3
4
5
bsktest(x,...)
## S3 method for class 'formula'
bsktest(x, data, index=NULL, listw,
test=c("LMH","LM1","LM2","CLMlambda","CLMmu"), 
standardize=FALSE, method = "eigen", ...)

Arguments

x

a formula

data

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

index

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

listw

a listw representing the spatial structure

test

one of c("LMH","LM1","LM2","CLMlambda","CLMmu"), the test to be performed

standardize

whether to standardize the test statistic or not (applies only to LM1 and LM2)

method

select a method for ML in "CLMmu". the default is "eigen"

...

additional arguments to be passed

Value

an object of class htest

Author(s)

Gianfranco Piras

References

Baltagi, B.H., Song, S.H. and Koh, W. (2003) Testing panel data regression models with spatial error correlation. Journal of Econometrics, 117, 123–150.

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

See Also

sphtest

Examples

1
2
3
4
5
data(Produc, package="plm")
data(usaww)
fm <- log(gsp)~log(pcap)+log(pc)+log(emp)+unemp
bsktest(fm,data=Produc, listw = mat2listw(usaww),
  test="LM1")

Example output

Loading required package: spdep
Loading required package: sp
Loading required package: Matrix

	Baltagi, Song and Koh SLM1 marginal test

data:  log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp
LM1 = 64.304, p-value < 2.2e-16
alternative hypothesis: Random effects

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