snorm {VGAM} | R Documentation |
Density and random generation for the skew-normal distribution.
dsnorm(x, location = 0, scale = 1, shape = 0, log = FALSE) rsnorm(n, location = 0, scale = 1, shape = 0)
x |
vector of quantiles. |
n |
number of observations. Must be a single positive integer. |
location |
The location parameter xi. A vector. |
scale |
The scale parameter w. A positive vector. |
shape |
The shape parameter. It is called alpha in
|
log |
Logical.
If |
See skewnormal1
, which currently only estimates the shape
parameter.
More generally here, Z = xi + w * Y where
Y has a standard skew-normal distribution
(see skewnormal1
),
xi is the location parameter and
w is the scale parameter.
dsnorm
gives the density,
rsnorm
generates random deviates.
The default values of all three parameters corresponds to the skew-normal being the standard normal distribution.
T. W. Yee
http://tango.stat.unipd.it/SN.
## Not run: N <- 200 # grid resolution shape <- 7 x <- seq(-4, 4, len = N) plot(x, dsnorm(x, shape = shape), type = "l", col = "blue", las = 1, ylab = "", lty = 1, lwd = 2) abline(v = 0, h = 0) lines(x, dnorm(x), col = "orange", lty = 2, lwd = 2) legend("topleft", leg = c(paste("Blue = dsnorm(x, ", shape,")", sep = ""), "Orange = standard normal density"), lty = 1:2, lwd = 2, col = c("blue", "orange")) ## End(Not run)