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
sfobject of observation data. Please note that the column names of the independent variables should not beallornone.- listw
(optional) A
listwobject. Seespdep::mat2listw()andspdep::nb2listw()for details.- discvar
(optional) Name of continuous variable columns that need to be discretized. Noted that when
formulahasdiscvar,datamust have these columns. Default isall, which means all independent variables are used asdiscvar. Whendiscvaris 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. Themodelvalue must be any ofols,gwr,lag,errororsac.- 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.
factorglobal factor detection result
interactionglobal interactive detection results
optdiscindependent variable optimal spatial discretization
allfactorfactor detection results corresponding to different numbers of discreteization
modelregression 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
NTD = sf::st_as_sf(gdverse::NTDs, coords = c('X','Y'))
g = sesp(incidence ~ ., data = NTD, discvar = 'none',
model = 'ols', overlay = 'intersection')
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 22.164 15.020
#> elevation 0.607 1.183 26.946 7.409
#> soiltype 0.386 79.675 98.997 -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.
