sample.freqtab function

Bootstrap Random Sampling from Frequency Tables

Bootstrap Random Sampling from Frequency Tables

An extension of sample to objects of class ‘freqtab’ for bootstrap sampling.

sample.freqtab(x, size = sum(x), replace = TRUE)

Arguments

  • x: object of class ‘freqtab’ , which is an array of counts across one or more numeric dimensions.
  • size: non-negative integer giving the sample size.
  • replace: logical with default TRUE indicating whether sampling should be with replacement.

Returns

A table array, as a ‘freqtab’ object, sampled from the original x.

Examples

# Sample with replacement from ACT math and compare results set.seed(2021) rx <- as.freqtab(ACTmath[, 1:2]) rxs <- sample.freqtab(rx) summary(rx) summary(rxs)

See Also

table, ftable, summary.freqtab, plot.freqtab

Author(s)

Anthony Albano tony.d.albano@gmail.com

  • Maintainer: Anthony Albano
  • License: GPL-3
  • Last published: 2022-06-07