Title: | The Minimax Distribution Family |
---|---|
Description: | The minimax family of distributions is a two-parameter family like the beta family, but computationally a lot more tractible. |
Authors: | Bill Venables |
Maintainer: | Bill Venables <[email protected]> |
License: | GPL-2 | GPL-3 |
Version: | 1.1.1 |
Built: | 2024-11-18 04:53:22 UTC |
Source: | https://github.com/cran/minimax |
Standard functions to calculate probabilities, densities and quantiles for the minimax family, and to generate pseudo-random values.
Bill Venables
Maintainer: Bill Venables <[email protected]>
See this document for a detailed discussion.
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)
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)
Four short functions to provide density, cumulative probability, quantile and random generation computational facilities for the minimax family of distributions.
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)
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)
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? |
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.
A vector of density, probability, quantile or pseudo-random values, respectively. Shape and name attributes of the first argument are preserved in the result.
The functions are all written in pure R
code.
Bill Venables
See this document for a detailed discussion.
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))
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))