rpdStat | R Documentation |

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.

```
rpdStat(data, probability, lambda = 1, nDim, r, random.state = NULL)
```

`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. |

a numeric value that reflects the statistic obtained after an execution of rpdTest at that time.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.