Functions to compute a Gaussian kernel.

gaussian_kernel_confidence(
  vertical_r0 = 0.05,
  vertical_sd = 1,
  horizontal_r0 = vertical_r0,
  horizontal_sd = vertical_sd,
  tail_included = TRUE
)

gaussian_kernel_radius(
  vertical_radius,
  vertical_sd = 1,
  horizontal_radius = vertical_radius,
  horizontal_sd = vertical_sd,
  tail_included = TRUE
)

Arguments

vertical_r0

[numeric] The kernel's r0 (exponential) in the vertical dimension.

vertical_sd

[numeric] The kernel's standard deviation in the vertical dimension.

horizontal_r0

[numeric] The kernel's r0 (exponential) in the horizontal dimension.

horizontal_sd

[numeric] The kernel's standard deviation in the horizontal dimension.

tail_included

[logical] Whether or not to include the kernel tail.

vertical_radius

[numeric] The kernel's radius in the vertical dimension.

horizontal_radius

[numeric] The kernel's radius in the horizontal dimension.

Value

A matrix corresponding to the kernel.

Examples


gaussian_kernel_confidence(vertical_r0 = 0.4, vertical_sd = 1, 
                           horizontal_r0 = 0.5, horizontal_sd = 2)
#>            [,1]       [,2]       [,3]       [,4]       [,5]
#> [1,] 0.01514034 0.01166897 0.01318859 0.01166897 0.01514034
#> [2,] 0.05478271 0.04222215 0.04772063 0.04222215 0.05478271
#> [3,] 0.08678126 0.06688409 0.07559422 0.06688409 0.08678126
#> [4,] 0.05478271 0.04222215 0.04772063 0.04222215 0.05478271
#> [5,] 0.01514034 0.01166897 0.01318859 0.01166897 0.01514034
gaussian_kernel_confidence(vertical_r0 = 0.4, vertical_sd = 1, 
                           horizontal_r0 = 0.5, horizontal_sd = 2)
#>            [,1]       [,2]       [,3]       [,4]       [,5]
#> [1,] 0.01514034 0.01166897 0.01318859 0.01166897 0.01514034
#> [2,] 0.05478271 0.04222215 0.04772063 0.04222215 0.05478271
#> [3,] 0.08678126 0.06688409 0.07559422 0.06688409 0.08678126
#> [4,] 0.05478271 0.04222215 0.04772063 0.04222215 0.05478271
#> [5,] 0.01514034 0.01166897 0.01318859 0.01166897 0.01514034