simplex.uniform {SHT} | R Documentation |
Probability Simplex : Tests of Uniformity
Description
Given a data such that its rows are
vectors in a probability simplex, i.e.,
test whether the data is uniformly distributed.
Usage
simplex.uniform(X, method)
Arguments
X |
an |
method |
(case-insensitive) name of the method to be used, including
|
Value
a (list) object of S3
class htest
containing:
- statistic
a test statistic.
- p.value
-value under
.
- alternative
alternative hypothesis.
- method
name of the test.
- data.name
name(s) of provided sample data.
Examples
## pseudo-uniform data generation
N = 100
P = 4
X = matrix(stats::rnorm(N*P), ncol=P)
for (n in 1:N){
x = X[n,]
x = abs(x/sqrt(sum(x^2)))
X[n,] = x^2
}
## run the tests
simplex.uniform(X, "LRT")
simplex.uniform(X, "lrtsym")
[Package SHT version 0.1.8 Index]