library("coin")
symmetry_test(success ~ test | subject, data = df, teststat = "quad")
Asymptotic General Independence Test
data: success by
groups A, B, C, D, E, F, G, H, I, J, K, L
stratified by subject
chi-squared = 23.9298, df = 11, p-value = 0.01303
can be used to compute the test without additional coding and
symmetry_test(success ~ test | subject, data = df, teststat = "quad",
distribution = approximate(10000))
Approximative General Independence Test
data: success by
groups A, B, C, D, E, F, G, H, I, J, K, L
stratified by subject
chi-squared = 23.9298, p-value = 0.006
approximates the p value by Monte-Carlo procedures.
Best wishes,
Torsten
BTW, a quick Google search shows that the pcochran() function is in the
'outliers' package on CRAN, which also has a cochran.test() function
HTH,
Marc Schwartz