R/dcircbeta.R

Defines functions dcircbeta

Documented in dcircbeta

dcircbeta <- function(x, m, a, b, rads = FALSE, logden = FALSE) {
  if ( !rads )  x <- x * pi/180
  con <- cos(x - m)
  den <-  -(a + b) * log(2) - lbeta(a, b) + (a - 0.5) * log(1 + con) + (b - 0.5) * log(1 - con)
  if ( !logden )  den <- exp(den)
  den
}

Try the Directional package in your browser

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

Directional documentation built on Oct. 12, 2023, 1:07 a.m.