inudge.plot.qq: QQ-plot of GNG model vs. observed data

inudge.plot.qqR Documentation

QQ-plot of GNG model vs. observed data

Description

Produces a QQ-plot for visual inspection of quality of fit with regards to the uniform Gaussian (iNUDGE) mixture model estimated using the function inudge.fit

Usage

inudge.plot.qq(data, obj, resolution = 10, xlab = NULL, ylab = NULL,
  main = NULL, pch = NULL, ...)

Arguments

data

an R list of vector of normalized intensities (counts). Each element can correspond to particular chromosome. User can construct their own list containing only the chromosome(s) they want to analyze.

obj

a list object returned by gng.fit function.

resolution

optional number of points used to sample the estimated density function.

xlab

optional x-axis label (see par).

ylab

optional y-axis label (see par).

main

optional plot title (see par).

pch

optional plotting symbol to use (see par).

...

additional graphical arguments to be passed to methods (see par).

See Also

inudge.fit, qqplot

Examples

library(DIME);

# generate simulated datasets with underlying uniform and 2-normal distributions
set.seed(1234);
N1 <- 1500; N2 <- 500; rmu <- c(-2.25,1.5); rsigma <- c(1,1); 
rpi <- c(.10,.45,.45); a <- (-6); b <- 6; 
chr4 <- list(c(-runif(ceiling(rpi[1]*N1),min = a,max =b),
  rnorm(ceiling(rpi[2]*N1),rmu[1],rsigma[1]), 
  rnorm(ceiling(rpi[3]*N1),rmu[2],rsigma[2])));
chr9 <- list(c(-runif(ceiling(rpi[1]*N2),min = a,max =b),
  rnorm(ceiling(rpi[2]*N2),rmu[1],rsigma[1]), 
  rnorm(ceiling(rpi[3]*N2),rmu[2],rsigma[2])));
# analyzing chromosome 4 and 9
data <- list(chr4,chr9);

# fit iNUDGE model with 2-normal components and maximum iteration =20 
set.seed(1234);
bestInudge <- inudge.fit(data, K=2, max.iter=20)

# QQ-plot
inudge.plot.qq(data,bestInudge);


DIME documentation built on May 9, 2022, 5:05 p.m.