powered by
This function generates data for problems that use contingency tables
gen.cont.table.data(n, A, B, tbl = FALSE, rho)
A matrix with two columns
sample size
vector of values of first categorical variable
vector of values of second categorical variable
should output be a table
correlation between A and B
gen.cont.table.data(10, c("a", "b"), 1:3, rho=0.9)
Run the code above in your browser using DataLab