dST {betategarch}R Documentation

The skewed t distribution

Description

Density, random number generation, mean, variance, skewness and kurtosis functions for the uncentred skewed t distribution. The skewing method is that of Fernandez and Steel (1998).

Usage

dST(y, df = 10, sd = 1, skew = 1, log = FALSE)
rST(n, df = 10, skew = 1)
STmean(df, skew = 1)
STvar(df, skew = 1)
STskewness(df, skew = 1)
STkurtosis(df, skew = 1)

Arguments

y

numeric vector of quantiles

n

integer, the number of observations

df

degrees of freedom, greater than 0 and less than Inf

sd

scale, greater than 0 and less than Inf

skew

skewness, greater than 0 and less than Inf. Symmetry obtains when skew = 1 (default).

log

logical. TRUE returns the natural log of the density value, FALSE (default) returns the density value.

Details

Empty

Value

dST:

a numeric value, either the density value or the natural log of the density value

rST:

a numeric vector with n random numbers

STmean:

The mean of an uncentred skewed t variable

STvar:

The variance of an uncentred skewed t variable

STskewness:

3rd. moment of a standardised skewed t variable

STkurtosis:

4th. moment of a standardised skewed t variable

Note

Empty

Author(s)

Genaro Sucarrat, http://www.sucarrat.net/

References

Fernandez and Steel (1998), 'On Bayesian Modeling of Fat Tails and Skewness', Journal of the American Statistical Association 93, pp. 359-371.

See Also

tegarchSim

Examples

##generate 1000 random numbers from the skewed t:
set.seed(123)
eps <- rST(500, df=5) #symmetric t
eps <- rST(500, df=5, skew=0.8) #skewed to the left
eps <- rST(500, df=5, skew=2) #skewed to the right

##compare empirical mean with analytical:
mean(eps)
STmean(5, skew=2)

##compare empirical variance with analytical:
var(eps)
STvar(5, skew=2)

[Package betategarch version 3.3 Index]