Title: | A Heavy-Headed Distribution |
---|---|
Description: | The density, cumulative distribution, quantiles, and i.i.d random variables of a heavy-headed distribution. For more information, please see the vignette. |
Authors: | Runlong Tang [aut, cre] |
Maintainer: | Runlong Tang <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.0.1 |
Built: | 2024-12-01 08:48:00 UTC |
Source: | CRAN |
This function gives the values of the density of the heavy-headed distribution.
dhh(x, a=0, b=1, alpha=0.1)
dhh(x, a=0, b=1, alpha=0.1)
x |
x is a vector of real values, at which the values of the density will be calculated. |
a , b
|
The interval (a,b) is the support of the distribution. The default values for a and b are 0 and 1, respectively. |
alpha |
It is a positive parameter of the distribution. Its default value is set to be 0.1. When alpha = 1, the distribution is uniform. When alpha > 1, the density at a is zero. |
See the references.
It returns the values of the density at x.
Runlong Tang
Runlong Tang (2018) A Note On Finite Moments, Rediscovery Of The Pareto Distribution and Distributions With Heavy Tails and Heads (v1) https://sites.google.com/site/tangrunlong/notes-on-finance
dhh(0.5) dhh(0.5, 0, 1, 0.1) dhh(c(0.5, 0.7)) curve(dhh, -1, 2) curve(dhh(x, a=0, b=1, alpha=0.1), -1, 2) curve(dhh(x, a=0, b=10, alpha=0.1), -1, 11)
dhh(0.5) dhh(0.5, 0, 1, 0.1) dhh(c(0.5, 0.7)) curve(dhh, -1, 2) curve(dhh(x, a=0, b=1, alpha=0.1), -1, 2) curve(dhh(x, a=0, b=10, alpha=0.1), -1, 11)
This function gives the values of the CDF of the heavy-headed distribution.
phh(x, a = 0, b = 1, alpha = 0.1)
phh(x, a = 0, b = 1, alpha = 0.1)
x |
x is a vector of real values, at which the values of the CDF will be calculated. |
a , b
|
The interval (a,b) is the support of the distribution. The default values for a and b are 0 and 1, respectively. |
alpha |
It is a positive parameter of the distribution. Its default value is set to be 0.1. When alpha = 1, the distribution is uniform. When alpha > 1, the density at a is zero. |
See the references.
It returns the values of the CDF at x.
Runlong Tang
Runlong Tang (2018) A Note On Finite Moments, Rediscovery Of The Pareto Distribution and Distributions With Heavy Tails and Heads (v1) https://sites.google.com/site/tangrunlong/notes-on-finance
phh(0) phh(1) phh(0.5) phh(0.5, 0, 1, 0.1) phh(c(0.5, 0.7)) curve(phh, from = -1, to = 2) curve(phh(x, a=0, b=1, alpha=0.1), -1, 2) curve(phh(x, a=0, b=10, alpha=0.1), -1, 11) curve(phh(x, a=0, b=100, alpha=0.1), -1, 11)
phh(0) phh(1) phh(0.5) phh(0.5, 0, 1, 0.1) phh(c(0.5, 0.7)) curve(phh, from = -1, to = 2) curve(phh(x, a=0, b=1, alpha=0.1), -1, 2) curve(phh(x, a=0, b=10, alpha=0.1), -1, 11) curve(phh(x, a=0, b=100, alpha=0.1), -1, 11)
This function gives the quantiles of the heavy-headed distribution.
qhh(p, a = 0, b = 1, alpha = 0.1)
qhh(p, a = 0, b = 1, alpha = 0.1)
p |
p is a vector of probabilities, at which the quantiles of the CDF will be calculated. |
a , b
|
The interval (a,b) is the support of the distribution. The default values for a and b are 0 and 1, respectively. |
alpha |
It is a positive parameter of the distribution. Its default value is set to be 0.1. When alpha = 1, the distribution is uniform. When alpha > 1, the density at a is zero. |
See the references.
It returns the quantiles of the CDF at p.
Runlong Tang
Runlong Tang (2018) A Note On Finite Moments, Rediscovery Of The Pareto Distribution and Distributions With Heavy Tails and Heads (v1) https://sites.google.com/site/tangrunlong/notes-on-finance
qhh(0.9) qhh(0.9, a=0, b=1, alpha=0.1) qhh(0.9, a=0, b=10, alpha=0.1) qhh((1:9)/10) curve(qhh, from = 0.1, to = 0.9) curve(qhh(x, 0, 1, 0.1), from = 0.1, to = 0.9) curve(qhh(x, a=10, b=100, alpha = 0.1), from = 0.1, to = 0.9)
qhh(0.9) qhh(0.9, a=0, b=1, alpha=0.1) qhh(0.9, a=0, b=10, alpha=0.1) qhh((1:9)/10) curve(qhh, from = 0.1, to = 0.9) curve(qhh(x, 0, 1, 0.1), from = 0.1, to = 0.9) curve(qhh(x, a=10, b=100, alpha = 0.1), from = 0.1, to = 0.9)
This function generate i.i.d. random variables following the heavy-headed distribution.
rhh(n, a = 0, b = 1, alpha = 0.1)
rhh(n, a = 0, b = 1, alpha = 0.1)
n |
It is the number of the random variables. |
a , b
|
The interval (a,b) is the support of the distribution. The default values for a and b are 0 and 1, respectively. |
alpha |
It is a positive parameter of the distribution. Its default value is set to be 0.1. When alpha = 1, the distribution is uniform. When alpha > 1, the density at a is zero. |
See the references.
It returns a vector of n random varialbes following the heavy-headed distribution.
Runlong Tang
Runlong Tang (2018) A Note On Finite Moments, Rediscovery Of The Pareto Distribution and Distributions With Heavy Tails and Heads (v1) https://sites.google.com/site/tangrunlong/notes-on-finance
rhh(1) rhh(2) hist(rhh(10000), freq=FALSE) curve(dhh, add = TRUE, col = 2) dhh(c(0.1, 0.01, 0.001, 0.0001, 0.00001))
rhh(1) rhh(2) hist(rhh(10000), freq=FALSE) curve(dhh, add = TRUE, col = 2) dhh(c(0.1, 0.01, 0.001, 0.0001, 0.00001))