Learn R Programming

mgwrsar (version 1.3.2)

golden_search_2d_bandwidth: Optimization of 2D Bandwidths (Spatial and Temporal) using Golden Section Search

Description

This function optimizes spatial and temporal bandwidths simultaneously using a 2D Golden Section Search approach. It is typically used internally by search_bandwidths when refine = TRUE for spatio-temporal models (Type 'GDT').

Usage

golden_search_2d_bandwidth(formula, data, coords, fixed_vars, kernels, Model,
                                  control, lower.bound.space, upper.bound.space,
                                  lower.bound.time, upper.bound.time,
                                  tolerance_s = 1e-06, tolerance_t = 1e-06,
                                  max_iter = 10)

Value

A list containing:

minimum

Vector of optimized bandwidths c(h_spatial, h_temporal).

objective

Final AICc value.

model

The fitted mgwrsar model object.

Arguments

formula

A formula object.

data

A data frame containing the variables.

coords

A matrix of coordinates (spatial indices).

fixed_vars

Vector of names of variables with fixed coefficients.

kernels

Vector of kernel types (e.g., c('gauss', 'gauss')).

Model

Character string specifying the model type (e.g., 'GWR').

control

List of control parameters.

lower.bound.space

Numeric. Lower bound for the spatial bandwidth search.

upper.bound.space

Numeric. Upper bound for the spatial bandwidth search.

lower.bound.time

Numeric. Lower bound for the temporal bandwidth search.

upper.bound.time

Numeric. Upper bound for the temporal bandwidth search.

tolerance_s

Numeric. Convergence tolerance for the spatial dimension. Default is 1e-6.

tolerance_t

Numeric. Convergence tolerance for the temporal dimension. Default is 1e-6.

max_iter

Integer. Maximum number of iterations for the optimization loop. Default is 10.

See Also

golden_search_bandwidth, search_bandwidths