# \donttest{
set.seed(1)
RDF <- random.test.data(8, 8, 3)
Coords <- RDF[, 4:5]
bw.test <- grf.bw(dep ~ X1 + X2, dataset = RDF, kernel = "adaptive",
coords = Coords,
bw.min = 12, bw.max = 16, step = 2,
trees = 100, mtry = 1, nthreads = 1L,
forests = FALSE, geo.weighted = TRUE,
verbose = FALSE)
bw.test$Best.BW
# }
if (FALSE) {
## Real-world demonstration on the Greek Income dataset.
## Not run by R CMD check because an exhaustive bandwidth search on
## 325 municipalities is intrinsically slow.
data(Income)
Coords <- Income[, 1:2]
bwe <- grf.bw(Income01 ~ UnemrT01 + PrSect01, dataset = Income,
kernel = "adaptive", coords = Coords,
bw.min = 30, bw.max = 80, step = 5,
forests = FALSE, geo.weighted = TRUE)
m <- grf(Income01 ~ UnemrT01 + PrSect01, dframe = Income,
bw = bwe$Best.BW, kernel = "adaptive", coords = Coords)
}
Run the code above in your browser using DataLab