dBvm: Bivariate Sine von Mises density

View source: R/tvm.R

dBvmR Documentation

Bivariate Sine von Mises density

Description

Evaluation of the bivariate Sine von Mises density and its normalizing constant.

Usage

dBvm(x, mu, kappa, logConst = NULL)

constBvm(M = 25, kappa)

Arguments

x

a matrix of size c(nx, 2) for evaluating the density.

mu

two-dimensional vector of circular means.

kappa

three-dimensional vector with concentrations (\kappa_1, \kappa_2, \lambda).

logConst

logarithm of the normalizing constant. Computed if NULL.

M

number of terms considered in the series expansion used for evaluating the normalizing constant.

Details

If \kappa_1 = 0 or \kappa_2 = 0 and \lambda \neq 0, then constBvm will perform a Monte Carlo integration of the constant.

Value

A vector of length nx with the evaluated density (dBvm) or a scalar with the normaalizing constant (constBvm).

References

Singh, H., Hnizdo, V. and Demchuk, E. (2002) Probabilistic model for two dependent circular variables, Biometrika, 89(3):719–723, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/biomet/89.3.719")}

Examples

x <- seq(-pi, pi, l = 101)[-101]
plotSurface2D(x, x, f = function(x) dBvm(x = x, mu = c(0, pi / 2),
                                         kappa = c(2, 3, 1)),
             fVect = TRUE)

egarpor/sdetorus documentation built on March 4, 2024, 1:23 a.m.