calculate-pvalues {isobar} | R Documentation

## Calculate and Adjust Ratio and Sample p-values.

### Description

Functions for calculating and adjusting ratios and sample p-values. Usually, these are called by proteinRatios or peptideRatios.

### Usage

      calculate.ratio.pvalue(lratio, variance, ratiodistr = NULL)
      calculate.sample.pvalue(lratio, ratiodistr)

      calculate.mult.sample.pvalue(lratio, ratiodistr, strict.pval,
                                   lower.tail, n.possible.val, n.observed.val)

      adjust.ratio.pvalue(quant.tbl, p.adjust, sign.level, globally = FALSE)

### Arguments

`lratio` | log 10 protein or peptide ratios.
`ratiodistr` | Fitted ratio distribution/
`variance` | Variance of lratios.
`strict.pval` | If FALSE, missing ratios are ignored. If TRUE, missing ratios are penalized by giving them a sample.pval of 0.5.
`lower.tail` | lower.tail of distribution?
`n.possible.val` | Number of possible ratios.
`n.observed.val` | Number of observed ratios.
`quant.tbl` | Quantification table (from proteinRatios or peptideRatios).
`p.adjust` | p-value adjustment method (see ?p.adjust).
`sign.level` | Ratio significance level.
`globally` | Whether the p-values should be adjusted over all conditions, or individually in each condition.

### Author(s)

Florian P. Breitwieser

### See Also

`proteinRatios`,`peptideRatios`

### Examples

      lratio <- c(-1,-1,seq(from=-1,to=1,by=.25),1,1)
      variance <- c(0,1,rep(0.1,9),0,1)
      ratiodistr.precise <- new("Norm",mean=0,sd=.25)
      ratiodistr.wide <- new("Norm",mean=0,sd=.5)

      # ratio p-value is impacted only by the variance
      # sample p-value captures whether the ratio distribution is narrow ('precise')
      #  or wide
      data.frame(lratio, variance,
                 ratio.pvalue=calculate.ratio.pvalue(lratio, variance),
                 sample.pvalue.precise=calculate.sample.pvalue(lratio,ratiodistr.precise),
                 sample.pvalue.wide=calculate.sample.pvalue(lratio,ratiodistr.wide))

[Package isobar version 1.30.0 Index]