mydata<-as.table(matrix(c(51,2,42,46,7,
4,0,5,3,0,
44,4,174,39,2,
14,3,34,36,4,
4,1,26,11,0,
1,0,1,2,0,
0,0,0,0,0,
5,0,4,2,0,
1,0,3,0,0,
0,0,0,0,0,
1006,112,921,495,91,
81,1,79,22,2,
1084,109,1909,397,134,
486,42,419,220,33,
63,3,151,26,1,
34,3,7,21,1,
8,0,2,1,0,
23,0,20,13,3,
6,11,5,0,0,
0,0,3,0,0,
28,0,18,4,7,
0,0,2,0,0,
22,2,98,14,1,
5,0,25,0,0,
2,0,0,0,0), nrow=25, ncol=5, byrow = TRUE))
hyp <- "a:=x[1,1]+x[1,2]+x[1,3]+x[1,4]+x[1,5];
b:=x[1,1]+x[2,1]+x[3,1]+x[4,1]+x[5,1];
c:=x[7,1]+x[7,2]+x[7,3]+x[7,4]+x[7,5];
d:=x[6,2]+x[7,2]+x[8,2]+x[9,2]+x[10,2];
e:=x[13,1]+x[13,2]+x[13,3]+x[13,4]+x[13,5];
f:=x[11,3]+x[12,3]+x[13,3]+x[14,3]+x[15,3];
g:=x[14,1]+x[14,2]+x[14,3]+x[14,4]+x[14,5];
h:=x[11,4]+x[12,4]+x[13,4]+x[14,4]+x[15,4];
i:=x[14,1]+x[14,2]+x[14,3]+x[14,4]+x[14,5];
j:=x[16,3]+x[17,3]+x[18,3]+x[19,3]+x[20,3];
k:=x[19,1]+x[19,2]+x[19,3]+x[19,4]+x[19,5];
l:=x[16,4]+x[17,4]+x[18,4]+x[19,4]+x[20,4];
a > b & c > d & e > f & k > l;
a > b & c > d & g > h & i > j;
a = b & c = d & e = f & k = l;
a = b & c = d & g = h & i = j"
test_that("contingency table throws error when there are linear deps in defined parameters", {
expect_error(gorica(mydata, hyp))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.