Closed philchalmers closed 9 years ago
This seems to occur in assocstats(), but could occur in other places too. In the call
assocstats()
structure(list(table = x, chisq_tests = tab, phi = phi, contingency = cont, cramer = cramer), class = "assocstats")
for assocstats(), change it to
structure(list(table = x, chisq_tests = tab, phi = ifelse(all(dim(x) == 2L), phi, NA), contingency = cont, cramer = cramer), class = "assocstats")
to return an NA for $\phi$ when the table is not 2x2. Alternatively, only print Cramer's V, and in the case where the table is 2x2 change the print() output label to Phi-Coefficient instead of Cramer's V, because in that case they are equivalent.
print()
Phi-Coefficient
Cramer's V
Thanks; fixed in rev. 800.
This seems to occur in
assocstats()
, but could occur in other places too. In the callfor
assocstats()
, change it toto return an NA for $\phi$ when the table is not 2x2. Alternatively, only print Cramer's V, and in the case where the table is 2x2 change the
print()
output label toPhi-Coefficient
instead ofCramer's V
, because in that case they are equivalent.