generateObject.contingencyTable: generateObject.contingencyTable

Description Usage Arguments Value Examples

Description

Create a contingency table with certain properties.

Usage

1
2
3
## S3 method for class 'contingencyTable'
generateObject(obj, n = NULL, CC = c(0.45, 0.55),
  V = NULL, C = NULL, chisq = NULL, digits = 0, verbose = F)

Arguments

obj

contingency table object

n

integer range: total number of observations

CC

numeric range: target corrected contingency coefficient (default: c(0.45, 0.55))

V

numeric range: target Cramer's V (default: NULL)

C

numeric range: target contingency coefficient (default: NULL)

chisq

numeric range: target chi square value (default: NULL)

digits

integer: number of digits after the comma for the expected frequencies (default: 0)

verbose

integer: verbosity of function (default: 0)

Value

a contingency table with the approximately required properties

Examples

1
2
ft  <- contingencyTable(table(round(runif(10)), round(runif(10))))
ft2 <- generate(ft)

sigbertklinke/mmstat documentation built on May 14, 2019, 8:36 a.m.