bw_checks: Check function for parameters in bandwidth selection methods

View source: R/bandwidth_selection_cv_tnkde_sf.R

bw_checksR Documentation

Check function for parameters in bandwidth selection methods

Description

A check function for bandwidth selection methods raising an error if a parameter is not valid

Usage

bw_checks(
  check,
  lines,
  samples,
  events,
  kernel_name,
  method,
  bws_net = NULL,
  bws_time = NULL,
  arr_bws_net = NULL,
  arr_bws_time = NULL,
  adaptive = FALSE,
  trim_net_bws = NULL,
  trim_time_bws = NULL,
  diggle_correction = FALSE,
  study_area = NULL
)

Arguments

check

A boolean indicating if the geometries must be checked

lines

A feature collection of linestrings representing the underlying network

samples

A feature collection of points representing the sample location

events

a feature collection of points representing the events

kernel_name

The name of the kernel to use

method

The name of the NKDE to use

bws_net

An ordered numeric vector with all the network bandwidths

bws_time

An ordered numeric vector with all the time bandwidths

arr_bws_net

An array with all the local netowrk bandwidths precalculated (for each event, and at each possible combinaison of network and temporal bandwidths). The dimensions must be c(length(net_bws), length(time_bws), nrow(events)))

arr_bws_time

An array with all the local time bandwidths precalculated (for each event, and at each possible combinaison of network and temporal bandwidths). The dimensions must be c(length(net_bws), length(time_bws), nrow(events)))

adaptive

A boolean indicating if local bandwidths must be calculated

trim_net_bws

A numeric vector with the maximum local network bandwidth. If local bandwidths have higher values, they will be replaced by the corresponding value in this vector.

trim_time_bws

A numeric vector with the maximum local time bandwidth. If local bandwidths have higher values, they will be replaced by the corresponding value in this vector.

diggle_correction

A Boolean indicating if the correction factor for edge effect must be used.

study_area

A feature collection of polygons representing the limits of the study area.

Examples

# no example provided, this is an internal function

spNetwork documentation built on May 29, 2024, 10:18 a.m.