Learn R Programming

neodistr (version 0.1.2)

jfst: Jones Faddy's Skew-t Distribution

Description

To calculate density function, distribution function, quantile function, and build data from random generator function for the Jones-Faddy's Skew-t Distribution.

Usage

djfst(x, mu = 0, sigma = 1, alpha = 2, beta = 2, log = FALSE)

pjfst( q, mu = 0, sigma = 1, alpha = 2, beta = 2, lower.tail = TRUE, log.p = FALSE )

qjfst( p, mu = 0, sigma = 1, alpha = 2, beta = 2, lower.tail = TRUE, log.p = FALSE )

rjfst(n, mu = 0, sigma = 1, alpha = 2, beta = 2)

Value

djfst gives the density , pjfst gives the distribution function, qjfst gives quantiles function, rjfst generates random numbers.

Arguments

x, q

vector of quantiles.

mu

a location parameter.

sigma

a scale parameter.

alpha

a shape parameter (skewness).

beta

a shape parameter (kurtosis).

log, log.p

logical; if TRUE, probabilities p are given as log(p) The default value of this parameter is FALSE

lower.tail

logical;if TRUE (default), probabilities are \(P\left[ X\leq x\right]\), otherwise, \(P\left[ X>x\right] \).

p

vectors of probabilities.

n

number of observations.

Author

Anisa' Faoziah

Details

Jones-Faddy's Skew-t Distribution

The Jones-Faddy's Skew-t distribution with parameters \(\mu\), \(\sigma\),\(\alpha\), and \(\beta\) has density: $$f(x |\mu,\sigma,\beta,\alpha)= \frac{c}{\sigma} {\left[{1+\frac{z}{\sqrt{\alpha+\beta+z^2}}}\right]}^{\alpha+\frac{1}{2}} {\left[{1-\frac{z}{\sqrt{\alpha+\beta+z^2}}}\right]}^{\beta+\frac{1}{2}}$$ where \(-\infty<x<\infty, -\infty<\mu<\infty, \sigma>0, \alpha>0, \beta>0,\) \(z =\frac{x-\mu}{\sigma} \), \( c = {\left[2^{\left(\alpha+\beta-1\right)} {\left(\alpha+\beta\right)^{\frac{1}{2}}} B(a,b)\right]}^{-1} \),

References

Jones, M.C. and Faddy, M. J. (2003) A skew extension of the t distribution, with applications. Journal of the Royal Statistical Society, Series B, 65, pp 159-174

Rigby, R.A. and Stasinopoulos, M.D. and Heller, G.Z. and De Bastiani, F. (2019) Distributions for Modeling Location, Scale, and Shape: Using GAMLSS in R.CRC Press

Examples

Run this code
djfst(4, mu=0, sigma=1, alpha=2, beta=2)
pjfst(4, mu=0, sigma=1, alpha=2, beta=2)
qjfst(0.4, mu=0, sigma=1, alpha=2, beta=2)
r=rjfst(10000, mu=0, sigma=1, alpha=2, beta=2)
head(r)
hist(r, xlab = 'jfst random number', ylab = 'Frequency', 
main = 'Distribution of jfst Random Number ')

Run the code above in your browser using DataLab