Learn R Programming

Rariant (version 1.8.3)

splitSample: Split Sample for Binomial Data

Description

Sample splitting, according to Hall, 2014.

Usage

splitSampleBinom(x, n)

Arguments

x
Number of successes
n
Number of trials

Value

  • A vector with the rate $p = \frac{X}{N}$, obtained with sample splitting.

Details

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.

References

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.

Examples

Run this code
n = 10
m = 5
pt = 0.5

x = rbinom(m, n, pt)
p = x/n

ps = splitSampleBinom(x, n)

round(cbind(p, ps), 2)

Run the code above in your browser using DataLab