splitSample {Rariant} | R Documentation |
Sample splitting, according to Hall, 2014.
splitSampleBinom(x, n)
x |
Number of successes |
n |
Number of trials |
These functions implement sample splitting of a binomial rate.
Note that the results depend on the state of the random number generator, and are therefore not strictly deterministic.
A vector with the rate p = X/N, obtained with sample splitting.
Decrouez, Geoffrey, and Peter Hall. "Split Sample Methods for Constructing Confidence Intervals for Binomial and Poisson Parameters." Journal of the Royal Statistical Society: Series B (Statistical Methodology), 2013, n/a–n/a. doi:10.1111/rssb.12051.
n = 10 m = 5 pt = 0.5 x = rbinom(m, n, pt) p = x/n ps = splitSampleBinom(x, n) round(cbind(p, ps), 2)