Skip to contents

Create an instance of MGWRConfig

Usage

mgwr_config(
  bw = NA_real_,
  adaptive = FALSE,
  kernel = c("gaussian", "exp", "bisquare", "tricube", "boxcar"),
  longlat = FALSE,
  p = 2,
  theta = 0,
  centered = TRUE,
  optim_bw = c("AIC", "CV", "no"),
  optim_threshold = 1e-05
)

Arguments

bw

Bandwidth value.

adaptive

Whether the bandwidth value is adaptive or not.

kernel

Kernel function used.

longlat

Whether the coordinates.

p

Power of the Minkowski distance, default to 2, i.e., Euclidean distance.

theta

Angle in radian to roate the coordinate system, default to 0.

centered

A logical vector of length equalling to the number of predictors, and note intercept is not included; if the element is TRUE, the corresponding predictor will be centered.

optim_bw

Whether optimize bandwidth after selecting models. Avaliable values are no, AIC, and CV. If no is specified, the bandwidth specified by argument bw is used in calibrating selected models.

optim_threshold

Threshold of bandwidth optimization.

Examples

mgwr_config(36, TRUE, "bisquare", optim_bw = "AIC")
#> An object of class "MGWRConfig"
#> Slot "bw":
#> [1] 36
#> 
#> Slot "adaptive":
#> [1] TRUE
#> 
#> Slot "kernel":
#> [1] "bisquare"
#> 
#> Slot "longlat":
#> [1] FALSE
#> 
#> Slot "p":
#> [1] 2
#> 
#> Slot "theta":
#> [1] 0
#> 
#> Slot "centered":
#> [1] TRUE
#> 
#> Slot "optim_bw":
#> [1] "AIC"
#> 
#> Slot "optim_threshold":
#> [1] 1e-05
#>