losh {sfdep} | R Documentation |
Local spatial heteroscedacity
Description
Local spatial heteroscedacity
Usage
losh(x, nb, wt, a = 2, ...)
losh_perm(x, nb, wt, a = 2, nsim = 499, ...)
Arguments
x |
a numeric vector. |
nb |
a neighbor list for example created by |
wt |
a weights list for example created by |
a |
the exponent applied to the local residuals |
... |
methods passed to spdep::LOSH |
nsim |
number of simulations to run |
Value
a data.frame
with columns
-
hi
: the observed statistic -
e_hi
: the sample average -
var_hi
: the sample variance -
z_hi
the approximately Chi-square distributed test statistic -
x_bar_i
: the local spatially weight mean for observationi
-
ei
: residuals
Examples
nb <- st_contiguity(guerry)
wt <- st_weights(nb)
x <- guerry$crime_pers
losh(x, nb, wt)
losh(x, nb, wt, var_hi = FALSE)
losh_perm(x, nb, wt, nsim = 49)
[Package sfdep version 0.2.4 Index]