plotNull: Plot the obtained null distribution along with a histogram of...

View source: R/F_plotNull.R

plotNullR Documentation

Plot the obtained null distribution along with a histogram of observed test statistics

Description

Plot the obtained null distribution along with a histogram of observed test statistics

Usage

plotNull(
  fit,
  lowColor = "yellow",
  highColor = "blue",
  idNull = NULL,
  nResampleCurves = length(fit$Weights),
  hSize = 0.5
)

Arguments

fit

an object returned by the reconsi() (or testDAA()) function

lowColor, highColor

The low and high ends of the colour scale

idNull

indices of known null taxa

nResampleCurves

The number of resampling null distributions to plot

hSize

A double, the size of the line of the collapsed null estimate

Value

a ggplot2 plot object

Examples

 p = 180; n = 50; B = 1e2
 #Low number of resamples keeps computation time down
 x = rep(c(0,1), each = n/2)
 mat = cbind(
 matrix(rnorm(n*p/10, mean = 5+x),n,p/10), #DA
 matrix(rnorm(n*p*9/10, mean = 5),n,p*9/10) #Non DA
 )
#Provide just the matrix and grouping factor, and test using the random null
fdrRes = reconsi(mat, x, B = B)
plotNull(fdrRes)

CenterForStatistics-UGent/reconsi documentation built on Nov. 13, 2023, 2:04 a.m.