R/compute_SF_WN.R

Defines functions compute_SF_WN

# Compute CLTS poulation value for wrapped normal distribution
#' @keywords internal
#' @importFrom circular dwrappednormal qwrappednormal
#' @noRd
compute_SF_WN <- function(rho) {
  lower <- qwrappednormal(0.25, mu = circular(0), rho = rho)
  upper <- qwrappednormal(0.75, mu = circular(0), rho = rho)

  f <- function(u) (1 - cos(u)) * dwrappednormal(circular(u), mu = circular(0), rho = rho)
  I <- integrate(f, lower, upper)$value
  2 * sqrt(I)
}

Try the bpDir package in your browser

Any scripts or data that you put into this service are public.

bpDir documentation built on Nov. 9, 2026, 9:07 a.m.