A contingency table is a non-negative integer matrix with specified row and column sums.
I am trying to create a contingency table from a particular type of data. This would be doable with loops …
r contingencyI'm trying to get a proportion for each cell by dividing each row by the row sum, but R gives …
r margin contingency> data(infert, package = "datasets") > tt = xtabs(~education + induced + spontaneous, data = infert) > ftable(tt) spontaneous 0 1 2 education induced 0-5…
r tabular contingencyI have a data frame which looks like this: structure(list(ab = c(0, 1, 1, 1, 1, 0, 0, 0, 1, 1), bc = c(1, 1, 1, 1, 0, 0, 0, 1, 0, 1), de = c(0, 0, 1, 1, 1, 0, 1, 1, 0, 1), cl = c(1, 2, 3, 1, 2, 3, 1, 2, 3, 2)), .Names = …
r contingency