kernel_smooth: Produce a smooth surface using 2D kernel density smoothing

Description Usage Arguments References

View source: R/misc.R

Description

Takes lon/lat coordinates, bins in two dimensions and smooths using kernel density smoothing. Kernel densities are computed using the fast Fourier transform method, which is many times faster than simple summation when using a large number of points. Each Kernel is student's-t distributed and scaled by the bandwidth lambda. If lambda is set to NULL then the optimal value of lambda is chosen automatically using the leave-one-out maximum likelihood method.

Usage

1
2
3
4
5
6
7
8
kernel_smooth(
  longitude,
  latitude,
  breaks_lon,
  breaks_lat,
  lambda = NULL,
  nu = 3
)

Arguments

longitude

longitude of input points

latitude

latitude of input points

breaks_lon

positions of longitude breaks

breaks_lat

positions of latitude breaks

lambda

bandwidth to use in posterior smoothing. If NULL then optimal bandwidth is chosen automatically by maximum-likelihood

nu

degrees of freedom of student's-t kernel

References

Barnard, Etienne. "Maximum leave-one-out likelihood for kernel density estimation." Proceedings of the Twenty-First Annual Symposium of the Pattern Recognition Association of South Africa. 2010


Michael-Stevens-27/silverblaze documentation built on May 28, 2021, 5:47 p.m.