Learn R Programming

tectonicr (version 0.4.9)

wnorm: The Wrapped Normal Distribution

Description

Density, probability distribution function, quantiles, and random generation for the circular normal distribution with mean \(\mu\) and standard deviation \(\sigma\).

Usage

rwnorm(n, mean = 0, sd = 1)

dwnorm(theta, mean = 0, sd = 1, axial = FALSE, log = FALSE)

pwnorm(theta, mean = 0, sd = 1, axial = FALSE, from = NULL, ...)

qwnorm( p, mean = 0, sd = 1, axial = FALSE, from = NULL, tol = .Machine$double.eps^(0.6), ... )

Value

dwnorm gives the density, pwnorm gives the probability of the wrapped normal distribution function, rwnorm generates random deviates (in degrees), and qwnorm provides quantiles (in degrees).

Arguments

n

number of observations. If length(n) > 1, the length is taken to be the number required.

mean

numeric. The mean vector in degrees.

sd

numeric. standard deviation of the (unwrapped) normal distribution in degrees.

theta

numeric. Angular value in degrees

axial

logical. Whether the data are axial, i.e. \(\pi\)-periodical (TRUE, the default) or directional, i.e. \(2 \pi\)-periodical (FALSE).

log

logical. If TRUE, probabilities p are given as \(\log(p)\).

from

if NULL is set to \(\mu-\pi\). This is the value from which the pvm and qvm are evaluated. in degrees.

...

optional parameters passed to underlying circular functions circular::pwrappednormal() and circular::qwrappednormal()

p

numeric. Vector of probabilities with values in \([0,1]\).

tol

numeric. The precision in evaluating the distribution function or the quantile.

See Also

cunif, wnorm, wcauchy, and vonmises

Examples

Run this code
set.seed(1)
x <- rwnorm(5, mean = 90, sd = 5)

dwnorm(x, mean = 90, sd = 5, axial = FALSE)
dwnorm(x, mean = 90, sd = 5, axial = TRUE)

pwnorm(x, mean = 90, sd = 5)
qwnorm(c(.25, .5, .75), mean = 90, sd = 5)

Run the code above in your browser using DataLab