int.prop.table | R Documentation |
Confidence intervals on a matrix of a contingent
int.prop.table(x, margin = NULL, conf.level = 0.95)
x |
: a matrix (a two-dimensional contingency table: the entries of x must be non-negative integers). |
margin |
: a vector giving the margins to split by. E.g., for a matrix 1 indicates rows, 2 indicates columns, c(1, 2) indicates rows and columns. When x has named dimnames, it can be a character vector selecting dimension names. |
conf.level |
: Confidence level (from 0 to 1) |
Confidence interval on proportions of table obtained with prop.table().
contingent = with(airquality, table(cut(Temp, quantile(Temp)), Month))
prop.table(contingent) # proportions
int.prop.table(contingent) # confidence intervals
# by row
prop.table(contingent,1) # proportions
int.prop.table(contingent,1) # confidence intervals
# by col
prop.table(contingent,2) # proportions
int.prop.table(contingent,2) # confidence intervals
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.