Functions to compute the probability density function, cumulative distribution function, and quantile function for the Map-Airy distribution.
Usage
mapairy_distribution(location = 0, scale = 1)
mapairy_pdf(x, location = 0, scale = 1)
mapairy_lpdf(x, location = 0, scale = 1)
mapairy_cdf(x, location = 0, scale = 1)
mapairy_lcdf(x, location = 0, scale = 1)
mapairy_quantile(p, location = 0, scale = 1)Value
A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.
See also
Boost Documentation for more details on the mathematical background.
Examples
# Map-Airy distribution with location 0 and scale 1
dist <- mapairy_distribution(0, 1)
# Apply generic functions
cdf(dist, 0.5)
#> [1] 0.7527466
logcdf(dist, 0.5)
#> [1] -0.2840266
pdf(dist, 0.5)
#> [1] 0.1477024
logpdf(dist, 0.5)
#> [1] -1.912556
hazard(dist, 0.5)
#> [1] 0.5973726
chf(dist, 0.5)
#> [1] 1.397342
mean(dist)
#> [1] 0
median(dist)
#> [1] -0.7167107
mode(dist)
#> [1] -1.161587
range(dist)
#> [1] -Inf  Inf
quantile(dist, 0.2)
#> [1] -1.834427
standard_deviation(dist)
#> [1] Inf
support(dist)
#> [1] -Inf  Inf
variance(dist)
#> [1] Inf
# Convenience functions
mapairy_pdf(3)
#> [1] 0.02799732
mapairy_lpdf(3)
#> [1] -3.575647
mapairy_cdf(3)
#> [1] 0.9316961
mapairy_lcdf(3)
#> [1] -0.07074859
mapairy_quantile(0.5)
#> [1] -0.7167107