dst | R Documentation |
Density function, distribution function and random number generation for the
skew-t
(ST) distribution. Functions copied from sn
CRAN
library v0.4.18 for argument name compatibility with st.mle
function
from the same version.
dst(x, location = 0, scale = 1, shape = 0, df = Inf, dp = NULL, log = FALSE)
rst(n = 1, location = 0, scale = 1, shape = 0, df = Inf, dp = NULL)
pst(x, location = 0, scale = 1, shape = 0, df = Inf, dp = NULL, ...)
qst(
p,
location = 0,
scale = 1,
shape = 0,
df = Inf,
tol = 1e-06,
dp = NULL,
...
)
x |
vector of quantiles. Missing values ( |
location |
vector of location parameters. |
scale |
vector of (positive) scale parameters. |
shape |
vector of shape parameters. With |
df |
degrees of freedom (scalar); default is |
dp |
a vector of length 4, whose elements represent location, scale
(positive), shape and df, respectively. If |
log |
logical; if TRUE, densities are given as log-densities. |
n |
sample size. |
... |
additional parameters passed to |
p |
vector of probabililities |
tol |
a scalar value which regulates the accuracy of the result of
|
Density (dst
), probability (pst
), quantiles
(qst
) and random sample (rst
) from the skew-t
distribution with given location
, scale
, shape
and
df
parameters.
Typical usages are
scale=1, shape=0, df=Inf, log=FALSE) dst(x, dp=, log=FALSE) pst(x, location=0, scale=1, shape=0, df=Inf, ...) pst(x, dp=, log=FALSE) qst(p, location=0, scale=1, shape=0, df=Inf, tol=1e-8, ...) qst(x, dp=, log=FALSE) rst(n=1, location=0, scale=1, shape=0, df=Inf) rst(x, dp=, log=FALSE)
Azzalini, A. and Capitanio, A. (2003). Distributions generated by perturbation of symmetry with emphasis on a multivariate skew-t distribution. J.Roy. Statist. Soc. B 65, 367–389.
st.mle
pdf <- dst(seq(-4,4,by=0.1), shape=3, df=5)
rnd <- rst(100, 5, 2, -5, 8)
q <- qst(c(0.25,0.5,0.75), shape=3, df=5)
stopifnot(identical(all.equal(pst(q, shape=3, df=5), c(0.25,0.5,0.75)), TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.