Last data update: 2014.03.03

R: Plot the WEB-Seq Maximum Likelihood Solution for the Weight...
optimPlotR Documentation

Plot the WEB-Seq Maximum Likelihood Solution for the Weight Parameter in the Weighted Likelihood

Description

The MLE solution is signified on a plot as the minimum of the negative log likelihood of the generalized beta prime distribution, parameterized in terms of the weight parameter.

Usage

optimPlot(y, m, groups, contrast=c(1,2), use.all.groups=TRUE,...)

Arguments

y

numeric matrix of inclusion counts.

m

numeric matrix of total counts: inclusion + exclusion.

groups

vector or factor giving the experimental group/condition for each sample/library.

contrast

numeric vector of length 2 specifying which levels of the "groups" factor should be compared. This is only relevant if "use.all.groups" is FALSE.

use.all.groups

logical. If TRUE, all data in "y" is used to estimate dispersions. If FALSE, only the 2 groups given in "contrasts" are used to estimate dispersions. Only makes a difference if "y" contains more than 2 groups. Default is TRUE.

...

further arguments passes to plot()

Details

The MLE estimate of the (transformed) weight parameter in the WEB-Seq method is checked to be a true global minimum of the negative log likelihood of the generalized beta prime distribution. The weight parameter is transformed from an infinite range to the (0,1) range before optimization and this is the range on which the estimate is checked.

Value

A plot to the current device

Author(s)

Sean Ruddy

Examples

data(exon)
# If all groups were used to estimate dispersions
  optimPlot(counts, offsets, groups) 
# If only the 2 groups being compared were used to estimate dispersions
  optimPlot(counts, offsets, groups, contrast=c(1,3), use.all.groups=FALSE) 

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DoubleExpSeq)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DoubleExpSeq/optimPlot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: optimPlot
> ### Title: Plot the WEB-Seq Maximum Likelihood Solution for the Weight
> ###   Parameter in the Weighted Likelihood
> ### Aliases: optimPlot
> 
> ### ** Examples
> 
> data(exon)
> # If all groups were used to estimate dispersions
>   optimPlot(counts, offsets, groups) 
> # If only the 2 groups being compared were used to estimate dispersions
>   optimPlot(counts, offsets, groups, contrast=c(1,3), use.all.groups=FALSE) 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>