gen.cont.table.data {moodlequizR}R Documentation

gen.cont.table.data

Description

This function generates data for problems that use contingency tables

Usage

gen.cont.table.data(n, A, B, tbl = FALSE, rho)

Arguments

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

Value

A matrix with two columns

Examples

gen.cont.table.data(10, c("a", "b"), 1:3, rho=0.9)

[Package moodlequizR version 2.1.1 Index]