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

bsktestR Documentation

Baltagi, Song and Koh LM test for spatial panels

Description

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

Usage

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

data(Produc, package="plm")
data(usaww)
fm <- log(gsp)~log(pcap)+log(pc)+log(emp)+unemp
bsktest(fm,data=Produc, listw = spdep::mat2listw(usaww),
  test="LM1")

splm documentation built on Dec. 12, 2023, 3:03 a.m.

Related to bsktest in splm...