# test if tin_4.6 is independent of class labels
ciTest(mesoBin$Meso, "Tin 4-6h", "class")
# test if tin_4.6 is independent of class conditioned on twi_2.4
ciTest(mesoBin$Meso, "Tin 4-6h", "class", "Twi 2-4h")
# repeat the test using G2 asymptotic distribution
ciTest(mesoBin$Meso, "Tin 4-6h", "class", "Twi 2-4h", test.type="g2")
Run the code above in your browser using DataLab