Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dvm

Density of some circular distributions


Description

Density of some circular distributions.

Usage

dvm(x, m, k, rads = FALSE, logden = FALSE)
dspml(x, mu, rads = FALSE, logden = FALSE)
dwrapcauchy(x, m, rho, rads = FALSE, logden = FALSE)
dcircpurka(x, m, a, rads = FALSE, logden = FALSE)
dggvm(x, param, rads = FALSE, logden = FALSE)
dcircbeta(x, m, a, b, rads = FALSE, logden = FALSE)
dcardio(x, m, rho, rads = FALSE, logden = FALSE)

Arguments

x

A vector with circular data.

m

The mean value of the von Mises distribution and of the cardioid, a scalar. This is the median for the circular Purkayastha distribution.

mu

The mean vector, a vector with two values for the "spml" and with

k

The concentration parameter.

rho

The rho parameter of the wrapped Cauchy distribution.

a

The alpha parameter of the circular Purkayastha distribution or the alpha parameter of the circular beta distribution.

b

The β parameter of the circular beta distribution.

param

The vector of parameters of the GGVM distribution as returned by the function ggvm.mle.

rads

If the data are in rads, then this should be TRUE, otherwise FALSE.

logden

If you the logarithm of the density values set this to TRUE.

Details

The density of the von Mises, bivariate projected normal, wrapped Cauchy or the circular Purkayastha distributions is computed.

Value

A vector with the (log) density values of x.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr

References

Mardia, K. V. and Jupp, P. E. (2000). Directional statistics. Chicester: John Wiley & Sons.

See Also

Examples

x <- rvonmises(500, m = 2.5, k = 10, rads = TRUE)
mod <- circ.summary(x, rads = TRUE, plot = FALSE)
den <- dvm(x, mod$mesos, mod$kappa, rads = TRUE, logden = TRUE )
mod$loglik
sum(den)

Directional

A Collection of R Functions for Directional Data Analysis

v4.9
GPL-2
Authors
Michail Tsagris, Giorgos Athineou, Anamul Sajib, Eli Amson, Micah J. Waldstein
Initial release
2021-03-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.