Learn R Programming

mgwrsar (version 1.3.2)

golden_search_bandwidth: Golden search bandwidth (deprecated)

Description

`golden_search_bandwidth()` is deprecated. Please use [search_bandwidths()], which provides a unified interface for spatial and spatio-temporal bandwidth search and can run golden-search refinement internally.

This wrapper preserves backward compatibility by translating the historical arguments (`lower.bound`, `upper.bound`, `Ht`) to the new interface.

Usage

golden_search_bandwidth(
  formula,
  Ht = NULL,
  data,
  coords,
  fixed_vars = NULL,
  kernels,
  Model = "GWR",
  control,
  lower.bound,
  upper.bound,
  tolerance = 1e-06,
  ncore = 1,
  show_progress = TRUE
)

Value

A list returned by [search_bandwidths()] (see its Value section).

Arguments

formula

A formula object specifying the model (e.g., y ~ x1 + x2).

Ht

Optional temporal bandwidth (used only for legacy calls). If not `NULL`, it is mapped to `ht_range = c(Ht, Ht)` (i.e., fixed temporal bandwidth) when `n_rounds = 0`.

data

A data frame containing the variables in the model.

coords

A matrix or data frame of coordinates (2 columns for spatial, 1 for temporal, or more for GDT).

fixed_vars

A character vector indicating the names of variables with spatially stationary (fixed) coefficients. Default is NULL (all coefficients are varying).

kernels

A character vector specifying the kernel types for spatial and temporal components (e.g., c("gauss", "gauss")).

Model

A character string specifying the model type. Options include "GWR", "MGWR", "OLS", "SAR", etc. Default is "GWR".

control

A named list of extra control arguments passed to the MGWRSAR function (e.g., adaptive, NN, Z).

lower.bound, upper.bound

Numeric bounds for the spatial bandwidth search; mapped to `hs_range`.

tolerance

Numeric tolerance; mapped to `tol` when relevant.

ncore

Number of cores to use.

show_progress

Logical; forwarded to [search_bandwidths()].