Description Usage Arguments Details Value Examples
This function inputs a contingency table and produces a univariate frequency table from the row marginals.
1 | row.marginal(contingencytable)
|
contingencytable |
A censored contingency table. Accepted classes are a data.frame or matrix. See Details section for formatting. |
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.
left censoring: <, L, <=, LE
interval censoring: - or I (symbol has to be placed in the middle of the two category values)
right censoring: >, >=, +, G, GE
uncensored: no symbol (only provide category value)
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 |
A univariate frequency table (data.frame) created from the row marginals.
1 2 | # contingencytable.csv is a preloaded contingency table example
row.marginal(contingencytable.csv)
|
Row Category Marginal Frequencies
1 1 54838
2 2 92830
3 3 154037
4 4 164925
5 5 134884
6 6 85593
7 7 43645
8 8 21859
9 9 9790
10 10+ 7613
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.