Spatially Explicit Stratified Power (SESP) Model
Usage
sesp(
formula,
data,
listw = NULL,
discvar = "all",
discnum = 3:8,
model = "ols",
durbin = FALSE,
overlay = "and",
alpha = 0.5,
intercept = FALSE,
bw = "AIC",
adaptive = TRUE,
kernel = "gaussian",
increase_rate = 0.05,
cores = 1,
...
)
Arguments
- formula
A formula for enhanced stratified power model.
- data
An
sf
object of observation data. Please note that the column names of the independent variables should not beall
ornone
.- listw
(optional) A
listw
object. Seespdep::mat2listw()
andspdep::nb2listw()
for details.- discvar
(optional) Name of continuous variable columns that need to be discretized. Noted that when
formula
hasdiscvar
,data
must have these columns. Default isall
, which means all independent variables are used asdiscvar
. Whendiscvar
is set tonone
, all independent variables do not need to be discretized.- discnum
(optional) Number of discretization. Default all will use
3:8
.- model
(optional) The type of linear model used, default is
ols
. Themodel
value must be any ofols
,gwr
,lag
orerror
.- durbin
(optional) Whether to consider spatial durbin terms, default is
false
.- overlay
(optional) Spatial overlay method. One of
and
,or
,intersection
. Default isand
.- alpha
(optional) Controlling the strength of spatial soft constraints, the larger the
alpha
, the stronger the spatial soft constraint. Default is0.5
.- intercept
(optional) Whether to include the intercept term in the gwr coefficient
tibble
. Default isFALSE
.- bw
(optional) The bandwidth used in selecting models. The optimal bandwidth can be selected using one of two methods:
AIC
, andCV
. Default isAIC
.- adaptive
(optional) Whether the bandwidth value is adaptive or not. Default is
TRUE
.- kernel
(optional) Kernel function. Default is
gaussian
.- increase_rate
(optional) The critical increase rate of the number of discretization. Default is
5%
.- cores
(optional) Positive integer (default is 1). When cores are greater than 1, use multi-core parallel computing.
- ...
(optional) Other arguments passed to
sdsfun::hclustgeo_disc()
.
Value
A list.
factor
global factor detection result
interaction
global interactive detection results
optdisc
independent variable optimal spatial discretization
allfactor
factor detection results corresponding to different numbers of discreteization
model
regression model used to estimate equivalent q values
Note
Note that when the number of continuous independent variables is small (three or fewer), the built-in spatial explicit
discretization in sesp
may overestimate the variable q value (when there are fewer input independent variables, GWR
tends to overestimate the contribution of each variable). In such cases, it is recommended to discretize these variables
beforehand and then input them into sesp
for computation.
Examples
NTDs = sf::st_as_sf(gdverse::NTDs, coords = c('X','Y'))
g = sesp(incidence ~ ., data = NTDs, discvar = 'none',
model = 'ols', overlay = 'intersection', cores = 1)
g
#> *** Spatially Explicit Stratified Power
#>
#> Q values are estimated using *Ordinary Least Square*
#>
#> -------------- Global Power of Determinant : ------------
#> Variable Qvalue AIC BIC LogLik
#> watershed 0.638 -10.039 -10.039 15.020
#> elevation 0.607 1.183 1.183 7.409
#> soiltype 0.386 79.675 79.675 -33.838
#>
#> ------------- Global Variable Interaction : ------------
#> Variable Interaction
#> watershed ∩ elevation Enhance, bi-
#> watershed ∩ soiltype Enhance, bi-
#> elevation ∩ soiltype Enhance, bi-
#>
#> ! Only the top ten items of global scale are displayed.
#> ! The others can be accessed through specific subsets.