split-sample: Split Sample for Binomial Data

Description Usage Arguments Details Value References Examples

Description

Sample splitting, according to Hall, 2014.

Usage

1

Arguments

x

Number of successes

n

Number of trials

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.

Value

A vector with the rate p = X/N, obtained with sample splitting.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
n = 10
m = 5
pt = 0.5

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

ps = splitSampleBinom(x, n)

round(cbind(p, ps), 2)

julian-gehring/Rariant documentation built on May 20, 2019, 4:20 a.m.