| 61 | == The inverted beta-binomial test == |

| 62 | [[BR]] |

| 63 | |

| 64 | === Description === |

| 65 | |

| 66 | Performs the inverted beta-binomial test for paired count data. |

| 67 | |

| 68 | === Usage === |

| 69 | {{{ |

| 70 | ibb.test(x, tx, group, alternative = c("two.sided", "less", "greater"), n.threads = 1) |

| 71 | }}} |

| 72 | |

| 73 | === Arguments === |

| 74 | |

| 75 | x: A vector or matrix of counts. When x is a matrix, the test is performed row by row. |

| 76 | |

| 77 | tx: A vector or matrix of the total sample counts. When tx is a matrix, the number of rows must be equal to the number of rows of x. |

| 78 | |

| 79 | group: A vector of group indicators. There should be two groups of equal size. The samples are matched by the order of appearance in each group. |

| 80 | |

| 81 | alternative: A character string specifying the alternative hypothesis: "two.sided" (default), "greater" or "less". |

| 82 | |

| 83 | ''n.threads'': The number of threads to be used. |

| 84 | |

| 85 | === Details === |

| 86 | |

| 87 | This test is designed for paired count data, for example data acquired before and after treatment. |

| 88 | |

| 89 | === Value === |

| 90 | |

| 91 | A list of values is returned: |

| 92 | |

| 93 | ''p.value'': The ''p''-value of the test. |

| 94 | |

| 95 | ''fc'': An estimation of the common fold change. |

| 96 | |

| 97 | === Author === |

| 98 | Thang V. Pham <t.pham@vumc.nl> |

| 99 | |

| 100 | === Reference === |

| 101 | |

| 102 | Pham TV, Jimenez CR (2012) An accurate paired sample test for count data. Bioinformatics, 28(18):i596-i602. |

| 103 | |

| 104 | === Examples === |

| 105 | {{{ |

| 106 | x <- c(33, 32, 86, 51, 52, 149) |

| 107 | tx <- c(7742608, 15581382, 20933491, 7126839, 13842297, 14760103) |

| 108 | group <- c(rep("cancer", 3), rep("normal", 3)) |

| 109 | ibb.test(x, tx, group) |

| 110 | }}} |

| 111 | |

| 112 | ---- |

| 113 | |