
i
i
“K23166” — 2015/1/28 — 9:35 — page 56 — #82
i
i
i
i
i
i
56 CHAPTER 5. COMMON STATISTICAL PROCEDURES
possible confounding effects of X
3
without having to estimate parameters for them.
mantelhaen.test(x1, x2, x3)
5.3.5 Cram´er’s V
Cram´er’s V (or phi coefficient) is a measure of association for nominal variables.
library(vcd)
assocstats(table(x, y))
5.3.6 Fisher’s exact test
Example: 5.7.3
fisher.test(y, x)
or
fisher.test(ymat)
Note: The fisher.test() command can accept either two class vectors or a table of counts
(here denoted by ymat). For tables with many rows and/or columns, p-values can be
computed using Monte Carlo simulation using the simulate.p.value option. ...