Description Usage Arguments Details Value Note Author(s) References See Also Examples
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).
1 2 3 4 5 6 |
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, http://www.sucarrat.net/
Fernandez and Steel (1998), 'On Bayesian Modeling of Fat Tails and Skewness', Journal of the American Statistical Association 93, pp. 359-371.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ##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)
|
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
[1] 1.448661
[1] 1.423525
[1] 2.880494
[1] 3.390243
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.