column.marginal: Column marginal table from contingency table

Description Usage Arguments Details Value Examples

View source: R/format_data_for_functions.R

Description

This function inputs a contingency table and produces a univariate frequency table from the column marginals.

Usage

1
column.marginal(contingencytable)

Arguments

contingencytable

A censored contingency table. Accepted classes are a data.frame or matrix. See Details section below formatting.

Details

Table Format:
The only symbols accepted for censored data are listed below. Note, less than or equal to (<= and LE) is not equivalent to less than (< and L) and greater than or equal to (>=, +, and GE) is not equivalent to greater than (> and G). Also, calculations use closed intervals.

The column names should be the Y category values. The first column should be the X category values and the row names can be arbitrary. The inside of the table are X * Y cross tabulation, which are either positive frequency values or probabilities. The row and column marginal totals corresponding to their X and Y category values need to be placed in this table. The top left, top right, and bottom left corners of the table should be NA or blank. The bottom right corner can be a total cross tabulation sum value, NA, or blank. The table below is a formatted example.

NA <20 20-30 >30 NA
<5 18 19 8 45
5-9 13 8 12 33
>=10 7 5 10 21
NA 38 32 31 NA

Value

A univariate frequency table (data.frame) created from the column marginals.

Examples

1
2
# contingencytable.csv is a preloaded contingency table example
column.marginal(contingencytable.csv)

revengc documentation built on May 2, 2019, 3:43 a.m.