Learn R Programming

NPCirc (version 3.1.2)

dwsn: 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)

Value

dwsn gives the density and rwsn generates random deviates.

Arguments

x

Vector of angles where the density is evaluated . The object is coerced to class circular.

n

Number of observations.

xi

Location parameter. The object is coerced to class circular.

eta

Scale parameter.

lambda

Skewness parameter.

K

Number of terms to be used in approximating the density. Default K=NULL.

min.k

Minimum number of terms used in approximating the density.

Author

Maria Oliveira, Rosa M. Crujeiras and Alberto Rodriguez--Casal

Details

The NAs will be automatically removed.

References

Pewsey, A. (2000) The wrapped skew--Normal distribution on the circle. Communications in Statistics - Theory and Methods, 29, 2459--2472.

Examples

Run this code
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)

Run the code above in your browser using DataLab