data(lizard)
## lizard is has named dimnames
names( dimnames( lizard ))
## checked with
is.named.array( lizard )
## Testing for conditional independence:
# the following are all equivalent:
ciTest(lizard, set=~diam + height + species)
# ciTest(lizard, set=c("diam", "height", "species"))
# ciTest(lizard, set=1:3)
# ciTest(lizard)
# (The latter because the names in lizard are as given above.)
## Testing for marginal independence
ciTest(lizard, set=~diam + height)
ciTest(lizard, set=1:2)
## Getting slice information:
ciTest(lizard, set=c("diam", "height", "species"), slice.info=TRUE)$slice
## Do Monte Carlo test instead of usual likelihood ratio test. Different
# options:
# 1) Do B*10 simulations divided equally over each slice:
ciTest(lizard, set=c("diam", "height", "species"), method="mc", B=400)
# 2) Do at most B*10 simulations divided equally over each slice, but stop
# when at most L extreme values are found
ciTest(lizard, set=c("diam", "height", "species"), method="smc", B=400)
Run the code above in your browser using DataLab