projectednormal: Projected bivariate normal on the circle

Description Usage Arguments Value Author(s) References Examples

Description

The projected normal distribution provides a flexible distribution for circular data, e.g., asymmetry and possible bimodality.

Usage

1
2
dpnorm(x, mu, sigma, log = FALSE)
rpnorm(n, mu, sigma, control.circular=list())

Arguments

x

a vector. The x and q objects are coerced to class circular.

n

number of observations.

mu

the mean vector of the bivariate normal.

sigma

the 2x2 variance and covariance matrix of the bivariate normal.

log

logical. If TRUE the log of the density is reported.

control.circular

the attribute of the resulting object.

Value

dpnorm gives the density, rpnorm generates random deviates.

Author(s)

Claudio Agostinelli

References

S.R. Jammalamadaka and A. SenGupta (2001). Topics in Circular Statistics, Section 2.2.4, World Scientific Press, Singapore. K.V. Mardia (1972). Statistics of Directional Data. Academic Press. London and New York. F. Wang and A.E. Gelfand (2013). Directional data analysis under the general projected normal distribution. Stat Methodol. 10(1):113-127. doi:10.1016/j.stamet.2012.07.005.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data1 <- rpnorm(100, mu=c(0,0), sigma=diag(2),
  control.circular=list(units="degrees")) # Uniform on the circle
plot(data1)

ff <- function(x) dpnorm(x, mu=c(0,0), sigma=diag(2)) # Uniform on the circle
curve.circular(ff, join=TRUE,
  main="Density of a Projected Normal Distribution \n mu=(0,0), sigma=diag(2)")

ff <- function(x) dpnorm(x, mu=c(1,1), sigma=diag(2)) # Unimodal
curve.circular(ff, join=TRUE, xlim=c(-1, 2.3),
  main="Density of a Projected Normal Distribution \n mu=(1,1), sigma=diag(2)")

sigma <- matrix(c(1,0.9,0.9,1), nrow=2)  
ff <- function(x) dpnorm(x, mu=c(0.5,0.5), sigma=sigma) # Bimodal
curve.circular(ff, join=TRUE, xlim=c(-1, 2.3),
  main="Density of a Projected Normal Distribution \n mu=(0.5,0.5), rho=0.9")

circular documentation built on May 1, 2019, 7:57 p.m.