plotSPMix: draws a histogram(univariate) or a scatterplot(2D or 3D) for...

plotSPMixR Documentation

draws a histogram(univariate) or a scatterplot(2D or 3D) for fitted SPMix object.

Description

plotSPMix draws a histogram(univariate) or a scatterplot(2D or 3D) for fitted SPMix object which can be customized with the ggplot2 package. plotSPMix() can be used for both hypothesis testing and density estimation. If testing is TRUE (default), it gives fitted density for both null and alternative distribution.

Usage

plotSPMix(
  x,
  thre_localFDR = 0.2,
  testing = TRUE,
  xlab = "x",
  ylab = "y",
  zlab = "z",
  coord_legend = c(8, -5, 0.2)
)

Arguments

x

object of class "SPMix"

thre_localFDR

Threshold of localFDR determining significant data points. (default: 0.2)

testing

If TRUE, it's for hypothesis testing. If FALSE, it's for density estimation (default: TRUE)

xlab

Label for x-axis on histogram or 3D scatter plot (default: "x")

ylab

Label for y-axis on 3D scatter plot (default: "y")

zlab

Label for z-axis on 3D scatter plot (default: "z")

coord_legend

Coordinate of a legend for a 3d scatter plot when given data is 2D or 3D. (default: c(8, -5, 0.2))

Value

Plot estimated semiparametric mixture density and return threshold value.

thre

Threshold z-value for null and alternative distribution


JungiinChoi/multiLocalFDR documentation built on Aug. 15, 2024, 1:04 a.m.