gss_gwbr | R Documentation |
The Golden Section Search (GSS) algorithm is used in searching for the best bandwidth for geographically weighted regression. For more details see Da Silva and Mendes (2018).
gss_gwbr(
yvar,
xvar,
lat,
long,
data,
method = c("fixed_g", "fixed_bsq", "adaptive_bsq"),
link = c("logit", "probit", "loglog", "cloglog"),
type = c("cv", "aic"),
globalmin = TRUE,
distancekm = TRUE,
maxint = 100
)
yvar |
A vector with the response variable name. |
xvar |
A vector with descriptive variable(s) name(s). |
lat |
A vector with the latitude variable name. |
long |
A vector with the longitude variable name. |
data |
A data set object with |
method |
Kernel function used to set bandwidth parameter. The options are: |
link |
The link function used in modeling. The options are: |
type |
Can be |
globalmin |
Logical. If |
distancekm |
Logical. If |
maxint |
A maximum number of iterations to numerically maximize the log-likelihood function in search of parameter estimates. The default is |
A list that contains:
global_min
- Global minimum of the function, giving the best bandwidth (h
).
local_mins
- Local minimums of the function.
type
- Function used to estimate the bandwidth.
data(saopaulo)
output_list=gss_gwbr("prop_landline",c("prop_urb","prop_poor"),"y","x",saopaulo,"fixed_g")
## Best bandwidth
output_list$global_min
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.