Description Usage Arguments Value Examples
Test if samples are behaving like an iid sample from a given distribution via the chisq test and a sequential approach. Only works for discrete distributions taking finitely many values.
1 | expect_mc_iid_chisq(object, prob, control = NULL)
|
object |
A function taking one argument - that generates n univariate iid samples. |
prob |
A vector of probabilities for finitely many consecutive integers from 0 onward. |
control |
a list controlling the algorithm
|
The first argument, invisibly, to allow chaining of expectations.
1 2 3 | sampler <- function(n) rbinom(n,prob=0.6,size=5)
expect_mc_iid_chisq(sampler, dbinom(0:5,prob=0.6,size=5))
testthat::expect_error(expect_mc_iid_chisq(sampler, dbinom(0:5,prob=0.63,size=5)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.