Learn R Programming

tsdistributions (version 1.0.2)

ddist: Distributions pqdr wrapper

Description

Density, distribution, quantile function and random number generation for all the distributions in the package.

Usage

ddist(
  distribution = "norm",
  x,
  mu = 0,
  sigma = 1,
  skew = 1,
  shape = 5,
  lambda = -0.5,
  log = FALSE
)

pdist( distribution = "norm", q, mu = 0, sigma = 1, skew = 1, shape = 5, lambda = -0.5, lower_tail = TRUE, log = FALSE )

qdist( distribution = "norm", p, mu = 0, sigma = 1, skew = 1, shape = 5, lambda = -0.5, lower_tail = TRUE, log = FALSE )

rdist( distribution = "norm", n, mu = 0, sigma = 1, skew = 1, shape = 5, lambda = -0.5 )

Value

d gives the density, p gives the distribution function, q gives the quantile function and r generates random deviates. Output depends on x or q length, or n for the random number generator.

Arguments

distribution

a valid distribution.

x, q

vector of quantiles.

mu

mean.

sigma

standard deviation.

skew

skew parameter.

shape

shape parameter.

lambda

additional shape parameter for the Generalized Hyperbolic distribution.

log

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

lower_tail

if TRUE (default), probabilities are \(P[X \le x]\) otherwise, \(P[X > x]\).

p

vector of probabilities.

n

number of observations.