Title: | The Johnson Quantile-Parameterised Distribution |
---|---|
Description: | Implementation of the Johnson Quantile-Parameterised Distribution in R. The Johnson Quantile-Parameterised Distribution (J-QPD) is a flexible distribution system that is parameterised by a symmetric percentile triplet of quantile values (typically the 10th-50th-90th) along with known support bounds for the distribution. The J-QPD system was developed by Hadlock and Bickel (2017) <doi:10.1287/deca.2016.0343>. This package implements the density, quantile, CDF and random number generator functions. |
Authors: | Bobby Ingram [aut, cre] |
Maintainer: | Bobby Ingram <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.3 |
Built: | 2024-10-31 22:15:03 UTC |
Source: | https://github.com/bobbyingram/rjqpd |
Density function of Johnson Quantile-Parameterised Distribution.
djqpd(x, params)
djqpd(x, params)
x |
vector of quantiles |
params |
jqpd object created using |
A numeric vector of density values corresponding to the x quantile vector
x <- c(0.32, 0.40, 0.60) params <- jqpd(x, lower = 0, upper = 1, alpha = 0.1) iles <- seq(0.01, 0.99, 0.01) density <- djqpd(x = iles, params)
x <- c(0.32, 0.40, 0.60) params <- jqpd(x, lower = 0, upper = 1, alpha = 0.1) iles <- seq(0.01, 0.99, 0.01) density <- djqpd(x = iles, params)
Calculates the parameters of the Johnson Quantile-Parameterised Distribution
jqpd(x, lower = 0, upper = Inf, alpha = 0.1)
jqpd(x, lower = 0, upper = Inf, alpha = 0.1)
x |
a length 3 numeric vector containing the symmetric percentile triplet values used to parameterise the distribution. |
lower |
a real number specifying the lower bound of the distribution. (default: 0) |
upper |
a real number specifying the upper bound of the distribution. A value of Inf indicates a semi-bounded distribution. (default: Inf) |
alpha |
a real number (between 0 and 0.5) used to describe the symmetric percentile triplet for which the quantile values provided in 'x' correspond. For instance, alpha = 0.1 (default value) indicates the percentiles used are [0.1, 0.5, 0.9]. |
A jqpd
object with elements
x |
a length 3 numeric vector containing the symmetric percentile triplet values used to parameterise the distribution |
alpha |
a real number (between 0 and 0.5) used to describe the symmetric percentile triplet for which the quantile values provided in 'x' correspond |
lower |
a real number specifying the lower bound of the distribution |
upper |
a real number specifying the upper bound of the distribution |
c |
distribution parameter |
n |
distribution parameter |
eta |
distribution parameter |
delta |
distribution parameter |
lambda |
distribution parameter |
k |
distribution parameter |
theta <- jqpd(c(0.32, 0.40, 0.6), 0, 1, alpha = 0.1)
theta <- jqpd(c(0.32, 0.40, 0.6), 0, 1, alpha = 0.1)
Calculates the kurtosis of a Johnson Quantile-Parameterised Distribution.
jqpd_kurtosis(params)
jqpd_kurtosis(params)
params |
jqpd object created using |
The kurtosis of the distribution as a length one numeric vector.
Calculates the mean of a Johnson Quantile-Parameterised Distribution.
jqpd_mean(params)
jqpd_mean(params)
params |
jqpd object created using |
The mean of the distribution as a length one numeric vector.
Calculates the standard-deviation of a Johnson Quantile-Parameterised Distribution.
jqpd_sd(params)
jqpd_sd(params)
params |
jqpd object created using |
The standard deviation of the distribution as a length one numeric vector.
Calculates the skewness of a Johnson Quantile-Parameterised Distribution.
jqpd_skewness(params)
jqpd_skewness(params)
params |
jqpd object created using |
The skewness of the distribution as a length one numeric vector.
Calculates the variance of a Johnson Quantile-Parameterised Distribution.
jqpd_var(params)
jqpd_var(params)
params |
jqpd object created using |
The variance of the distribution as a length one numeric vector.
Cumulative distribution function of Johnson Quantile-Parameterised Distribution.
pjqpd(x, params)
pjqpd(x, params)
x |
vector of quantiles |
params |
jqpd object created using |
A numeric vector of probabilities corresponding to the x quantiles vector
x <- c(0.32, 0.40, 0.60) params <- jqpd(x, lower = 0, upper = 1, alpha = 0.1) iles <- seq(0.01, 0.99, 0.01) probs <- pjqpd(x = iles, params)
x <- c(0.32, 0.40, 0.60) params <- jqpd(x, lower = 0, upper = 1, alpha = 0.1) iles <- seq(0.01, 0.99, 0.01) probs <- pjqpd(x = iles, params)
Plots the density, cumulative distribution function, quantile function and a set of 1000 random samples for a Johnson Quantile-Parameterised Distribution.
plot_jqpd(params)
plot_jqpd(params)
params |
jqpd object created using |
no return value, called for side effects only
Quantile function of Johnson Quantile-Parameterised Distribution.
qjqpd(p, params)
qjqpd(p, params)
p |
vector of probabilities |
params |
jqpd object created using |
A numeric vector of quantiles corresponding to the p probability vector
x <- c(0.32, 0.40, 0.60) params <- jqpd(x, lower = 0, upper = 1, alpha = 0.1) probs <- seq(0.01, 0.99, 0.01) quantiles <- qjqpd(p = probs, params)
x <- c(0.32, 0.40, 0.60) params <- jqpd(x, lower = 0, upper = 1, alpha = 0.1) probs <- seq(0.01, 0.99, 0.01) quantiles <- qjqpd(p = probs, params)
Generate random samples from a jqpd distribution object
rjqpd(n = 1, params)
rjqpd(n = 1, params)
n |
number of observations (default is 1) |
params |
jqpd object created using |
A numeric vector of n random samples from the input distribution
x <- c(0.32, 0.40, 0.60) params <- jqpd(x, lower = 0, upper = 1, alpha = 0.1) samples <- rjqpd(n = 1000, params)
x <- c(0.32, 0.40, 0.60) params <- jqpd(x, lower = 0, upper = 1, alpha = 0.1) samples <- rjqpd(n = 1000, params)