rpdStat: Randomized phi-divergence test: statistic part

View source: R/rpdtest.R

rpdStatR 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))


RPDTest documentation built on June 22, 2024, 6:52 p.m.

Related to rpdStat in RPDTest...