gss_gwbr {gwbr}R Documentation

Golden Section Search Algorithm

Description

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).

Usage

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
)

Arguments

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 yvar and xvar.

method

Kernel function used to set bandwidth parameter. The options are: "fixed_g", "fixed_bsq" or "adaptive_bsq". The default is "fixed_g".

link

The link function used in modeling. The options are: "logit", "probit", "loglog" or "cloglog". The default is "logit".

type

Can be "cv", when the Cross-Validation function is used to estimate the bandwidth or "aic", when the AIC function is used. The default is "cv".

globalmin

Logical. If TRUE search for the global minimum. The default is TRUE.

distancekm

Logical. If TRUE use the distance in kilometers otherwise, use the Euclidean distance. The default is TRUE.

maxint

A maximum number of iterations to numerically maximize the log-likelihood function in search of parameter estimates. The default is maxint=100.

Value

A list that contains:

Examples


data(saopaulo)
output_list=gss_gwbr("prop_landline",c("prop_urb","prop_poor"),"y","x",saopaulo,"fixed_g")

## Best bandwidth
output_list$global_min


[Package gwbr version 1.0.5 Index]