Learn R Programming

betategarch (version 3.3)

dST: 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.

Value

Details

Empty

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

Run this code
##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)

Run the code above in your browser using DataLab