Distributions: Distributions of the GAS package

Description Usage Arguments Details Value Author(s) Examples

Description

Density, distribution function, quantile function, random generator, moments, scores and information matrix of univariate and multivariate distributions of the GAS package.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ddist_Uni(y, Theta, Dist, log = FALSE)
pdist_Uni(q, Theta, Dist)
qdist_Uni(p, Theta, Dist)
rdist_Uni(Theta, Dist)
mdist_Uni(Theta, Dist)
Score_Uni(y, Theta, Dist)
IM_Uni(Theta, Dist)

ddist_Multi(y, Theta, Dist, log = FALSE)
rdist_Multi(Theta, N, Dist)
Score_Multi(y, Theta, Dist)

Arguments

y, q

numeric Scalar quantile. For Score_Multi and ddist_Multi, y is a numeric vector.

p

numeric Scalar probability.

Theta

numeric Vector of distribution parameters. The order of the parameters is generally: location, scale, skewness, shape, shape2. When the distribution defined by Dist does not have, say, the shape parameter, this should be simply omitted. See also DistInfo for specific distributions.

Dist

character Label of the conditional distribution, see DistInfo.

log

logical If TRUE, the density value p(y) is given as log(p(y)). Dy Default log = FALSE.

N

numeric Integer. cross-sectional dimension for the multivariate case.

Details

The function mdist_Uni returns a vector with four elements: mean, variance, skewness and kurtosis coefficients. The functions Score_Uni and IM_Uni returns the score and the Fisher information matrix for univariate distributions. The function Score_Multi returns the score for multivariate distributions. See DistInfo for the lists of supported distributions. These functions are not vectorized. ddist_Uni and ddist_Multi give the density, pdist_Uni gives the distribution function, qdist_Uni gives the quantile function, and rdist_Uni and rdist_Multi generate random deviates.

Value

  1. numeric scalar for: ddist_Uni, pdist_Uni, qdist_Uni, rdist_Uni,

  2. numeric vector for: Score_Uni, Score_Multi and rdist_Multi,

  3. matrix for IM_Uni.

Author(s)

Leopoldo Catania

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Skew Student-t distribution

# log density
Theta = c("location" = 0, "scales" = 1, "skewness" = 1.2, "shape" = 7)

ddist_Uni(y = 0.5, Theta, "sstd", TRUE)

# probability
pdist_Uni(q = -1.69, Theta, "sstd")

#quantile
qdist_Uni(p = 0.05, Theta, "sstd")

#random generator
rdist_Uni(Theta, "sstd")

#moments
mdist_Uni(Theta, "sstd")

LeopoldoCatania/GAS documentation built on April 27, 2020, 1:43 a.m.