Learn R Programming

betategarch (version 2.0)

rst: Random number generator for the skewed t distribution

Description

Random number generation from a skewed t distribution based on the Fernandez and Steel (1998) skewing method.

Usage

rst(n, df = 10, sd = 1, skew = 1)

Arguments

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).

Value

  • a numeric vector with n random numbers

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. Harvey and Sucarrat (2012), 'EGARCH models with fat tails, skewness and leverage', Cambridge Working Papers in Economics 1236, Faculty of Economics, University of Cambridge.

See Also

tegarch.sim, tegarch.sim2, dst

Examples

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

Run the code above in your browser using DataLab