Description Usage Arguments Value Author(s) References See Also Examples
A permutation bootstrap test for the approximate profile-likelihood estimator (APLE).
1 |
x |
a zero-mean detrended continuous variable |
listw |
a |
nsim |
number of simulations |
override\_similarity\_check |
default FALSE, if TRUE - typically for row-standardised weights with asymmetric underlying general weights - similarity is not checked |
useTrace |
default TRUE, use trace of sparse matrix |
A boot
object as returned by the boot
function.
Roger Bivand Roger.Bivand@nhh.no
Li, H, Calder, C. A. and Cressie N. A. C. (2007) Beyond Moran's I: testing for spatial dependence based on the spatial autoregressive model. Geographical Analysis 39, 357-375; Li, H, Calder, C. A. and Cressie N. A. C. (2012) One-step estimation of spatial dependence parameters: Properties and extensions of the APLE statistic, Journal of Multivariate Analysis 105, 68-84.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | example(aple)
oldRNG <- RNGkind()
RNGkind("L'Ecuyer-CMRG")
set.seed(1L)
boot_out_ser <- aple.mc(as.vector(scale(wheat$yield_detrend, scale=FALSE)),
nb2listw(nbr12, style="W"), nsim=500)
plot(boot_out_ser)
boot_out_ser
library(parallel)
oldCores <- set.coresOption(NULL)
nc <- detectCores(logical=FALSE)
# set nc to 1L here
if (nc > 1L) nc <- 1L
invisible(set.coresOption(nc))
set.seed(1L)
if (!get.mcOption()) {
cl <- makeCluster(nc)
set.ClusterOption(cl)
} else{
mc.reset.stream()
}
boot_out_par <- aple.mc(as.vector(scale(wheat$yield_detrend, scale=FALSE)),
nb2listw(nbr12, style="W"), nsim=500)
if (!get.mcOption()) {
set.ClusterOption(NULL)
stopCluster(cl)
}
boot_out_par
invisible(set.coresOption(oldCores))
RNGkind(oldRNG[1], oldRNG[2])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.