sample_size function

Estimate the sample size for a categorical variable.

Estimate the sample size for a categorical variable.

sample_size(max, min = 1, z = 1.96, error = 0.05)

Arguments

  • max: A number as the maximum value of the possible categories.
  • min: A number as the minimum value of the possible categories.
  • z: A number as the confidence coefficient.
  • error: Admissible sampling error.

Returns

The sample size for a categorical variable based on a variance heuristic approximation.

  • Maintainer: Elias Maciel
  • License: GPL-3 | file LICENSE
  • Last published: 2017-09-30

Useful links