friendly / VCDR

Visualizing categorical data with R
0 stars 0 forks source link

\S 4.2.5.1 CMHtest() mixes up rows and columns in the ordinary by categorical case #4

Closed davidjohannesmeyer closed 9 years ago

davidjohannesmeyer commented 9 years ago

Bug probably in CMHtest2():

[...] if("rmeans" %in% types) { A <- lkronecker( cbind(diag(R-1), rep(0, R-1)), t(cscores)) df <- R-1 table <- rbind(table, cmh(n, m, A, V, df)) Amats$rmeans <- A } if("cmeans" %in% types) { A <- lkronecker( t(rscores), cbind(diag(C-1), rep(0, C-1))) df <- C-1 table <- rbind(table, cmh(n, m, A, V, df)) Amats$cmeans <- A } [...]

friendly commented 9 years ago

The problem was in the order of labels for rmeans and cmeans. Fixed in vcdExtra rev 254. NB: vcdExtra on R-Forge now effectively requires vcd_1.3-3 for loddsratio(); I removed this dependency by using \dontrun{} for an example in Fungicide.Rd. I will wait until I re-compile Ch04 before closing this issue

friendly commented 9 years ago

Now works OK with vcdExtra_0.6-7