# NOT RUN {
require(spdep)
data(boston)
y <- boston.c[, "CMEDV" ]
x <- boston.c[,c("CRIM","ZN","INDUS", "CHAS", "NOX","RM", "AGE",
"DIS" ,"RAD", "TAX", "PTRATIO", "B", "LSTAT")]
xgroup <- boston.c[,"TOWN"]
coords <- boston.c[,c("LAT","LON")]
######## Regression considering spatially dependent residuals
#res <- besf(y = y, x = x, coords=coords)
#res
######## Regression considering spatially dependent residuals and NVC
######## (coefficients or NVC is selected)
#res2 <- besf(y = y, x = x, coords=coords, nvc = TRUE)
######## Regression considering spatially dependent residuals and NVC
######## (all the coefficients are NVCs)
#res3 <- besf(y = y, x = x, coords=coords, nvc = TRUE, nvc_sel=FALSE)
# }
Run the code above in your browser using DataLab