[R] Model fit using mcexact from exactLoglinTest

Michael.Laviolette at dhhs.state.nh.us Michael.Laviolette at dhhs.state.nh.us
Fri Jul 8 16:26:51 CEST 2011


I'm using the mcexact function from the exactLoglinTest package on data
comparing performance of rapid and laboratory tests for detection of H1N1
flu. My setup is as follows:

ridt.res <- c("A-B-", "A+B-", "A-B+")
pcr.res <- c("Negative", "AH3", "B")
xtab <- expand.grid(ridt = ridt.res, pcr = pcr.res)
xtab$counts <- c(271, 68, 7, 2, 74, 0, 3, 0, 9)
xtab$sym.pair <- factor(c(1, 2, 3, 2, 5, 4, 3, 4, 6))

Note that the table is mostly sparse off the main diagonal and that it
contains a symmetric pair of zeros. I'm trying to fit a quasi-symmetry
model with

mcexact(counts ~ ridt + sym.pair, data = xtab)

but I get the following error message:

Error in temp %*% solve(v[(n1 + 1):n, (n1 + 1):n]) %*% t(temp) :
  non-conformable arguments

Could you provide some guidance? Thanks.

-M. Laviolette



More information about the R-help mailing list