Description Usage Arguments Value References Examples
LeSage and Pace procedure
1 | lesage_pace(formula, data, listw, alpha = 0.05, criterion = "AIC")
|
formula |
a formula object (or one that can be coerced to that class): a symbolic description of the model to be fitted. |
data |
a data.frame object containing the variables in the model. |
listw |
a listw object containing weights. |
alpha |
a numeric value providing the confidence level between 0 and 1. |
criterion |
either AIC (default) or BIC: in case if several models are selected, using information criterion to draw out the best model. |
returns a data.frame object containing likelihood ratio tests information.
LeSage, J., & Pace, R. K. (2009). Introduction to spatial econometrics. Chapman and Hall/CRC.
1 2 3 4 5 6 7 8 9 10 | require(spatialreg)
require(spdep)
require(rgdal)
columbus <- readOGR(system.file("shapes/columbus.shp", package="spData")[1])
weights <- nb2listw(poly2nb(columbus))
formula <- CRIME ~ INC + HOVAL
lesage_pace(formula = formula, data = columbus,
listw = weights, alpha = 0.05, criterion = "AIC")
lesage_pace(formula = INC ~ CRIME, data = columbus, listw = weights)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.