splitSample {Rariant} | R Documentation

## 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

### 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

    n = 10
    m = 5
    pt = 0.5

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

    ps = splitSampleBinom(x, n)

    round(cbind(p, ps), 2)

[Package Rariant version 1.16.0 Index]