| Type: | Package |
| Title: | The Minimax Distribution Family |
| Version: | 1.1.1 |
| Date: | 2023-08-20 |
| Author: | Bill Venables |
| Maintainer: | Bill Venables <Bill.Venables@gmail.com> |
| Description: | The minimax family of distributions is a two-parameter family like the beta family, but computationally a lot more tractible. |
| Imports: | stats |
| License: | GPL-2 | GPL-3 |
| LazyLoad: | yes |
| NeedsCompilation: | no |
| Packaged: | 2023-08-20 04:08:37 UTC; bill |
| Repository: | CRAN |
| Date/Publication: | 2023-08-20 05:02:32 UTC |
Minimax distribution family
Description
Standard functions to calculate probabilities, densities and quantiles for the minimax family, and to generate pseudo-random values.
Author(s)
Bill Venables
Maintainer: Bill Venables <Bill.Venables@gmail.com>
References
See this document for a detailed discussion.
See Also
Examples
p <- pminimax(0:10/10, 1:5, 2)
q <- qminimax(p, 1:5, 2)
(d <- dminimax(matrix(0.5, 2, 2), 1:4, 2:3))
set.seed(123)
r <- rminimax(letters, 2, 3)
Minimax distribution family
Description
Four short functions to provide density, cumulative probability, quantile and random generation computational facilities for the minimax family of distributions.
Usage
dminimax(x, a = 1, b = 1, log = FALSE)
pminimax(x, a = 1, b = 1)
qminimax(y, a = 1, b = 1)
rminimax(n, a = 1, b = 1)
Arguments
x |
Numeric vector giving the values at which the densities or cumulative probabilities are to be calculated. |
y |
Numeric vector giving the values at which the quantiles are to be
calculated. Values must be between |
n |
The number of pseudo-random values to be generated. If
|
a, b |
Numeric vectors giving the parameters of the distribution. Values must be positive. |
log |
Logical scalar. Should the log-density be returned rather than the density itself? |
Details
The minimax family distributions is a two-parameter with support [0,1]. It has properties very like the beta family, though is computationally much more tractible. Both beta and minimax families have the uniform(0,1) distribution as a special case. For the minimax family, this is the default case.
This package provides the standard four functions for handling the
distribution in R using the standard prefix naming convention.
The functions are vectorized with respect to the arguments x,
y, a, and b, with short arguments recycled to
match the length of any longer ones.
Value
A vector of density, probability, quantile or pseudo-random values, respectively. Shape and name attributes of the first argument are preserved in the result.
Note
The functions are all written in pure R code.
Author(s)
Bill Venables
References
See this document for a detailed discussion.
See Also
Examples
p <- pminimax(0:10/10, 1:5, 2)
q <- qminimax(p, 1:5, 2)
(d <- dminimax(matrix(0.5, 2, 2), 1:4, 2:3))
set.seed(123)
(r <- rminimax(letters, 2, 3))