Description Usage Arguments Details Value Note Author(s) See Also Examples
Quantiles corresponding to the uniform distribution of the distribution function of a vector, or of the columns of a matrix or data frame.
1 | uniformQuantiles(X, K, decreasing=TRUE)
|
X |
a numeric vector, matrix, or data frame. |
K |
the number of quantiles. |
decreasing |
logical; if |
For a vector x, the kth uniform quantile, for k = 1,…,K, is the sample quantile at q = (k-0.5)/K. In other words, uniformQuantiles(X, K, FALSE)[k] = quantile(X, (k-0.5)/K)
if X
is a vector. If X
is a matrix or data frame, the function is applied to the columns of X
.
A vector of quantiles if X
is a vector, a matrix of quantiles of the columns of X
if X
is a matrix or data frame.
uniformQuantiles
is used to initialize component means in mixmod
and mdmixmod
.
Daniel Dvorkin
mixmod
, mdmixmod
; quantile
in package stats
.
1 2 3 4 5 6 7 8 9 10 | set.seed(123)
X = matrix(rnorm(300), ncol=3)
uniformQuantiles(X, 5)
# [,1] [,2] [,3]
# [1,] 1.26449867 1.0584323 1.55267383
# [2,] 0.51301442 0.3039516 0.56563159
# [3,] 0.06175631 -0.2258300 0.03591471
# [4,] -0.38719515 -0.6200279 -0.45546412
# [5,] -1.06822046 -1.2894076 -1.02776368
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.