Learn R Programming

ibdreg (version 0.1.3)

plotpval: Plot the -log10 of pvalues

Description

Plot lines connecting the the -log10 of pvalues for a series of tests

Usage

plotpval(pos, pmat, lty=1, lwd=1, col=1, title="", legend, 
         xlab="Position(cM)", ylab="-log10(pvalue)")

Arguments

pos
an index for the series of tests, usually assuming adjacent tests are correlated.
pmat
matrix of p-values, each column represents a different test, rows correspond to the pos[ition] index
lty
line type, see par()
lwd
line width, see par()
col
line color, see par()
title
title for the top-center of the plot
legend
vector of text strings explaning the tests in each column of pmat
xlab
x axis label
ylab
y axis label

Value

  • nothing is returned

Side Effects

none

Details

The default height for the y-axis is 3, which corresponds to a p-value of 1e-3. If any p-value is smaller, the height is -log10 of the smallest p-value in pmat.

See Also

par, title, legend

Examples

Run this code
plotpval(pos=1:10, pmat=cbind(runif(10)/5, runif(10)/10), 
         lty=c(1,2), col=c(1,2), legend=c("runif/5", "runif/10"))

Run the code above in your browser using DataLab