gen.cont.table.data {moodlequizR} | R Documentation |
This function generates data for problems that use contingency tables
gen.cont.table.data(n, A, B, tbl = FALSE, rho)
n |
sample size |
A |
vector of values of first categorical variable |
B |
vector of values of second categorical variable |
tbl |
should output be a table |
rho |
correlation between A and B |
A matrix with two columns
gen.cont.table.data(10, c("a", "b"), 1:3, rho=0.9)