Type: | Package |
Title: | The Johnson Quantile-Parameterised Distribution |
Version: | 0.2.3 |
Maintainer: | Bobby Ingram <ingram.bob@gmail.com> |
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. |
Suggests: | devtools, knitr, rmarkdown, testthat |
URL: | https://github.com/bobbyingram/rjqpd |
BugReports: | https://github.com/bobbyingram/rjqpd/issues |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
NeedsCompilation: | no |
Packaged: | 2020-09-21 19:22:20 UTC; BobbyIngram |
Author: | Bobby Ingram [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2020-09-25 09:20:06 UTC |
Density function of Johnson Quantile-Parameterised Distribution.
Description
Density function of Johnson Quantile-Parameterised Distribution.
Usage
djqpd(x, params)
Arguments
x |
vector of quantiles |
params |
jqpd object created using |
Value
A numeric vector of density values corresponding to the x quantile vector
Examples
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
Description
Calculates the parameters of the Johnson Quantile-Parameterised Distribution
Usage
jqpd(x, lower = 0, upper = Inf, alpha = 0.1)
Arguments
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]. |
Value
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 |
Examples
theta <- jqpd(c(0.32, 0.40, 0.6), 0, 1, alpha = 0.1)
Calculates the kurtosis of a Johnson Quantile-Parameterised Distribution.
Description
Calculates the kurtosis of a Johnson Quantile-Parameterised Distribution.
Usage
jqpd_kurtosis(params)
Arguments
params |
jqpd object created using |
Value
The kurtosis of the distribution as a length one numeric vector.
Calculates the mean of a Johnson Quantile-Parameterised Distribution.
Description
Calculates the mean of a Johnson Quantile-Parameterised Distribution.
Usage
jqpd_mean(params)
Arguments
params |
jqpd object created using |
Value
The mean of the distribution as a length one numeric vector.
Calculates the standard-deviation of a Johnson Quantile-Parameterised Distribution.
Description
Calculates the standard-deviation of a Johnson Quantile-Parameterised Distribution.
Usage
jqpd_sd(params)
Arguments
params |
jqpd object created using |
Value
The standard deviation of the distribution as a length one numeric vector.
Calculates the skewness of a Johnson Quantile-Parameterised Distribution.
Description
Calculates the skewness of a Johnson Quantile-Parameterised Distribution.
Usage
jqpd_skewness(params)
Arguments
params |
jqpd object created using |
Value
The skewness of the distribution as a length one numeric vector.
Calculates the variance of a Johnson Quantile-Parameterised Distribution.
Description
Calculates the variance of a Johnson Quantile-Parameterised Distribution.
Usage
jqpd_var(params)
Arguments
params |
jqpd object created using |
Value
The variance of the distribution as a length one numeric vector.
Cumulative distribution function of Johnson Quantile-Parameterised Distribution.
Description
Cumulative distribution function of Johnson Quantile-Parameterised Distribution.
Usage
pjqpd(x, params)
Arguments
x |
vector of quantiles |
params |
jqpd object created using |
Value
A numeric vector of probabilities corresponding to the x quantiles vector
Examples
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.
Description
Plots the density, cumulative distribution function, quantile function and a set of 1000 random samples for a Johnson Quantile-Parameterised Distribution.
Usage
plot_jqpd(params)
Arguments
params |
jqpd object created using |
Value
no return value, called for side effects only
Quantile function of Johnson Quantile-Parameterised Distribution.
Description
Quantile function of Johnson Quantile-Parameterised Distribution.
Usage
qjqpd(p, params)
Arguments
p |
vector of probabilities |
params |
jqpd object created using |
Value
A numeric vector of quantiles corresponding to the p probability vector
Examples
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
Description
Generate random samples from a jqpd distribution object
Usage
rjqpd(n = 1, params)
Arguments
n |
number of observations (default is 1) |
params |
jqpd object created using |
Value
A numeric vector of n random samples from the input distribution
Examples
x <- c(0.32, 0.40, 0.60)
params <- jqpd(x, lower = 0, upper = 1, alpha = 0.1)
samples <- rjqpd(n = 1000, params)