wrappedNormal | R Documentation |
Density, and random generation for the wrapped normal circular distribution.
rwrappednormal(n, mu = circular(0), rho = NULL, sd = 1,
control.circular = list())
dwrappednormal(x, mu = circular(0), rho = NULL, sd = 1,
K = NULL, min.k = 10)
pwrappednormal(q, mu = circular(0), rho = NULL, sd = 1,
from = NULL, K = NULL, min.k = 10, ...)
qwrappednormal(p, mu = circular(0), rho = NULL, sd = 1,
from = NULL, K = NULL, min.k = 10, tol = .Machine$double.eps^(0.6),
control.circular = list(), ...)
x , q |
vector of quantiles. The object is coerced to class
|
p |
vector of probabilities. |
n |
number of observations. |
mu |
mean direction of the distribution as a |
rho |
concentration parameter of the distribution. |
sd |
standard deviation of the (unwrapped) normal distribution. |
from |
if |
K |
number of terms to be used in approximating the density. |
min.k |
minimum number of terms used in approximating the density. |
tol |
passed to |
control.circular |
the attribute of the resulting object. |
... |
parameters passed to |
dwrappednormal
gives the density and rwrappednormal
generates random deviates, pwrappednormal
gives the
distribution function, and qwrappednormal
provides quantiles.
Claudio Agostinelli and Ulric Lund
Jammalamadaka, S. Rao and SenGupta, A. (2001). Topics in Circular Statistics, Section 2.2.7, World Scientific Press, Singapore.
data1 <- rwrappednormal(100, mu=circular(0), rho=0.7,
control.circular=list(units="degrees"))
plot(data1)
ff <- function(x) dwrappednormal(x, mu=circular(pi), rho=0.7)
curve.circular(ff, join=TRUE, xlim=c(-1.5, 1),
main="Density of a Wrapped Normal Distribution \n mu=pi, rho=0.7")
ff <- function(x) pwrappednormal(x, mu=circular(pi), rho=0.7)
curve.circular(ff, join=FALSE, xlim=c(-2, 2), ylim=c(-2, 2),
to=(2*pi-3*.Machine$double.eps), modulo="asis", nosort=TRUE,
main="Probability of a Wrapped Normal Distribution \n mu=pi,
rho=0.7, from=0")
ff <- function(x) pwrappednormal(x, mu=circular(pi), rho=0.7, from=circular(pi))
curve.circular(ff, join=FALSE, xlim=c(-2, 2), ylim=c(-2, 2), from=-pi,
to=(pi-3*.Machine$double.eps), modulo="asis", nosort=TRUE,
main="Probability of a Wrapped Normal Distribution \n mu=pi,
rho=0.7, from=pi")
plot(qwrappednormal, from=0, to=1)
plot(function(x) qwrappednormal(p=x, mu=circular(pi)), from=0, to=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.