Learn R Programming

gllm (version 0.38)

boot.table: Produce one bootstrap replicate of a vector of counts

Description

Given a vector of counts from a contingency table, produce a bootstrap replicate. Sampling zeroes are replaced by 0.5.

Usage

boot.table(y,strata=NULL)

Value

A vector of counts with the same total.

Arguments

y

is the observed contingency table.

strata

is a vector defining the strata for a stratified bootstrap.

Examples

Run this code
boot.table(c(1,3,4,2))
## 0.5 2.0 5.0 3.0
boot.table(c(1,3,4,2),c(1,2,1,2))
## 2 1 3 4

Run the code above in your browser using DataLab