This function does thin the data by rounding the observer and expected -log10 p-values to two places by default. When you pass in a list, the number of tests the confidence interval uses is determined by the vector with the least number of p-values - this gives the widest, most conservative confidence bands. Note that the confidence interval drawn depends on the total number of p-values given. If you wish to disable the confidence interval, use nf=F in your call to ot(). You can change that with the conf.points= parameter and you can change the alpha level from the default. The default settings will draw confidence intervals around the 1000 more significant points. The confidence intervals are calculated using the fact that the standard uniform order statistics follow a beta distribution. The names used in the legend correspond to the names of the elements in the list you pass in. Furthermore, you can use any of the lattice methods of adding a legend to your plot. Internally the different groups are drawn using the lattice superpose settings, so if you want more control over the color and shapes, you can use the par.settings=list(superpose.symbol=) settings. 90 )) ot ( my.pvalue.list, auto.key = list ( corner = c (. 05, ansformed = FALSE, pch = 20, aspect = "iso", prepanel = prepanel.qqunif, par.settings = list ( superpose.symbol = list ( pch = pch )). Library ( lattice ) ot <- function ( pvalues, should.thin = T, = 2, = 2, xlab = expression ( paste ( "Expected (", - log, " p-value)" )), ylab = expression ( paste ( "Observed (", - log, " p-value)" )), nf = TRUE, conf.points = 1000, l = "lightgray", conf.alpha =. Here is some code which will do that with some sample data: However, we must specify the correct function for the -log10 uniform ourself. Many of the quantile functions for the standard distributions are built in (qnorm, qt, qbeta, qgamma, qunif, etc). It can make a quantile-quantile plot for any distribution as long as you supply it with the correct quantile function. The easiest way to create a -log10 qq-plot is with the qqmath function in the lattice package. This page is entirely cribbed from an earlier version by Matthew Flickinger, one of our more outstanding graduate students. This page is based on a tutorial originally written by Matthew Flickinger Credits 1.3.5 Under the Hood: Customizing Graphics.
0 Comments
Leave a Reply. |