View source: R/betategarch-source.R
dST | R Documentation |
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).
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)
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. |
Empty
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 |
Empty
Genaro Sucarrat, https://www.sucarrat.net/
C. Fernandez and M. Steel (1998), 'On Bayesian Modeling of Fat Tails and Skewness', Journal of the American Statistical Association 93, pp. 359-371, \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1080/01621459.1998.10474117")}
tegarchSim
##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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.