getCT {cabootcrs}R Documentation

Converting a data matrix into a contingency table

Description

getCT recodes a data matrix from one format (n objects by p variables, counts for distinct combinations of p variables, indicator matrix or Burt matrix) into a contingency table, for cases where table() doesn't work

Usage

getCT(
  Xinput,
  input = "nbyp",
  Jk = NULL,
  maxcat = NULL,
  varandcat = TRUE,
  vars = NULL
)

Arguments

Xinput

A data matrix, in the form of a data frame or similar

input

See getBurt

Jk

See convert

maxcat

See convert

varandcat

See convert

vars

A list of the variable numbers to be used in the contingency table when there are more than 2.
If not all variables are wanted and the input is not n by p then Jk must be specified.

Value

A contingency table, giving counts for the two cross-classified variables

See Also

Other conversion functions: convert(), getBurt(), getdoubled(), getindicator()

Examples

nishCTvars23 <- getCT(NishData,Jk=rep(3,4),vars=2:3)


[Package cabootcrs version 2.1.0 Index]