This function performs a multiscale Geographically Weighted Regression (GWR) using a top-down scaling approach, adjusting GWR coefficients with a progressively decreasing bandwidth as long as the AICc criterion improves.
tds_mgwr(formula,data,coords,Model='tds_mgwr',kernels='triangle',
fixed_vars=NULL,H2=NULL,control_tds=list(nns=30,get_AIC=FALSE),
control=list(adaptive=TRUE))
a formula.
a dataframe.
default NULL, a dataframe or a matrix with coordinates
character containing the type of model: Possible values are "tds_mgwr" and "atds_mgwr", See Details for more explanation.
A vector containing the kernel types. Possible types: triangle ("triangle"), rectangle ("rectangle"), bisquare ("bisq"), tricube ("tcub"), gaussian ("gauss"), epanechnikov ("epane").
a vector with the names of spatiallay constant coefficient for mixed model. All other variables present in formula are supposed to be spatially varying. If empty or NULL (default), all variables in formula are supposed to be spatially varying.
A scalar or vector of time bandwidths.
list of extra control arguments for tds_mgwr models
list of extra control arguments for MGWRSAR wrapper
Length of the sequence of decreasing bandwidth. Should be between 20 and 100, default 30
Boolean, if the Global AICc using Yu et al 2019 should be computed. Required if the second stage 'atds_mgwr' has to be estimated. default FALSE
Starting model, 'GWR' or 'OLS', 'default OLS'.
If model='tds_mgwr', model_stage1 can be used as a starting model (either a GWR model or a preious tds_mgwr model). For model='atds_mgwr, the user can specified an tds_mgwr model already computed with get_AIC=TRUE. default NULL.
Parallel computation, default FALSE.
number of CPU core for parallel computation, default 1
Tolerance for stopping criteria, default 0.0001
Number of nrounds for 'atds_mgwr' model. Default 3.
verbose mode, default FALSE.
A vector of decreasing bandwidths given by the user, default NULL
The value of the highest bandwidth for the sequence of decreasing bandwidth, default NULL.
The value of the smallest bandwidth for the sequence of decreasing bandwidth, default number of covariates + 2 .
A vector of bandwidth, default NULL
A matrix of variables for genralized kernel product, default NULL.
A row-standardized spatial weight matrix for Spatial Aurocorrelation, default NULL.
Verbose mode, default FALSE.
A vector of boolean to choose adaptive version for each kernel.
The type of kernel for computing W, default NULL.
The bandwidth value for computing W, default 0.
Estimation method for computing the models with Spatial Dependence. '2SLS' or 'B2SLS', default '2SLS'.
Avector of target points, default NULL.
Parallel computation, default FALSE. If TRUE and control_tds$doMC is also TRUE, then control$doMC is set to FALSE.
Number of CPU core for parallel computation, default 1
If TRUE, compute a LOOCV criteria, default FALSE.
If TRUE, simplify the computation of CV criteria (remove or not i when using local instruments for model with lambda spatially varying), default TRUE.
When n >NmaxDist, only the maxknn first neighbours are used for distance compution, default 500.
When n >NmaxDist only the maxknn first neighbours are used for distance compution, default 5000
Verbose mode, default FALSE.
gwr_multiscale, MGWRSAR, bandwidths_mgwrsar, summary_mgwrsar.