dwsn {NPCirc} | R Documentation |
Wrapped skew-Normal density function
Description
Density function and random generation for the wrapped skew-Normal distribution introduced by Pewsey (2000).
Usage
dwsn(x,xi,eta,lambda,K=NULL,min.k=20)
rwsn(n,xi,eta,lambda)
Arguments
x |
Vector of angles where the density is evaluated . The object is coerced to class |
n |
Number of observations. |
xi |
Location parameter. The object is coerced to class |
eta |
Scale parameter. |
lambda |
Skewness parameter. |
K |
Number of terms to be used in approximating the density. Default |
min.k |
Minimum number of terms used in approximating the density. |
Details
The NAs will be automatically removed.
Value
dwsn
gives the density and rwsn
generates random deviates.
Author(s)
Maria Oliveira, Rosa M. Crujeiras and Alberto Rodriguez–Casal
References
Pewsey, A. (2000) The wrapped skew–Normal distribution on the circle. Communications in Statistics - Theory and Methods, 29, 2459–2472.
Examples
set.seed(2012)
# Density function of a wrapped skew-normal distribution WSN(pi,1,20)
wsn <- function(x) dwsn(x, xi=circular(pi), eta=1, lambda=20)
curve.circular(wsn,n=500,xlim=c(-1.65,1.65),main=expression(WSN(pi,1,20)))
# Random generation
data<-rwsn(50,xi=circular(pi),eta=1,lambda=20)
points(data)