Takes a vector of statistics with each element corresponds to a treatment vs control comparison, and calculates a combined statistics accross multiple treatments.

1 | ```
geneStats(T, method="OSP")
``` |

`T` |
a vector of statistics (z-scores converted) with each element correspond to a treatment vs control comparison. |

`method` |
the p-value integration method for combining accross multiple treatments. Available methods are Stouffer, OSP, Fisher, and maxP. The default method is OSP. |

a p-value after integration across treatments.

1 2 3 4 5 6 7 8 9 10 11 | ```
# load the example data
data(PM)
# convert statistics into z-scores
PM.zscores <- apply(PM, 2, function(x){qnorm(rank(x)/(nrow(PM)+1))})
# Rotate the matrix by contrast 1, -1, -1 (i.e. up-regulation, down-regulation, dow-regulation).
PM.rotated <- rotate3d(PM.zscores, contrast = c(1, -1, -1))
# combine rotated statistics across treatments
gene.pvalues <- apply(PM.rotated, 1, geneStats)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.