rpdStat {RPDTest} | R Documentation |
Randomized phi-divergence test: statistic part
Description
This is one of the auxiliary functions used to execute the rpdTest function. This function calculates the statistic for a single Randomized phi-divergence test. Users generally do not need to call this function except for testing purposes.
Usage
rpdStat(data, probability, lambda = 1, nDim, r, random.state = NULL)
Arguments
data |
the same data structure that provided in rpdTest. |
probability |
the same numeric vector that provided in rpdTest. |
lambda |
the same parameter that provided in rpdTest. |
nDim |
an integer indicating the dimension of the uniformly distributed vectors generated during the computation of the statistic. It is equal to the number of experiments for the multinomial distribution. |
r |
an integer indicating the dimension of the data parameter. It is equal to the number of possible outcomes of the multinomial distribution. |
random.state |
a numeric that controls the randomness of the samples used when generating uniformly distributed random vector on the n-sphere. |
Value
a numeric value that reflects the statistic obtained after an execution of rpdTest at that time.
Examples
d <- c(20,40)
#The next line is equivalent to rpdTest(d)$statistic
rpdStat(d, c(1/2,1/2), nDim = sum(d), r = length(d))