plotsgpv: Second-Generation p-Value Plotting

Description Usage Arguments Details References See Also Examples

View source: R/plotsgpv.R

Description

This function displays user supplied interval estimates (support intervals, confidence intervals, credible intervals, etc.) according to its associated second-generation p-value ranking.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
plotsgpv(
  est.lo,
  est.hi,
  null.lo,
  null.hi,
  set.order = "sgpv",
  x.show = NA,
  null.col = rgb(208, 216, 232, maxColorValue = 255),
  int.col = c("cornflowerblue", "firebrick3", "darkslateblue"),
  int.pch = NA,
  int.cex = 0.4,
  plot.axis = c(TRUE, TRUE),
  null.pt = NA,
  outline.zone = TRUE,
  title.lab = "Title",
  x.lab = "Position (by set.order)",
  y.lab = "Outcome label",
  legend.on = TRUE
)

Arguments

est.lo

A numeric vector of lower bounds of interval estimates. Values must be finite for interval to be drawn. Must be of same length as est.hi.

est.hi

A numeric vector of upper bounds of interval estimates. Values must be finite for interval to be drawn. Must be of same length as est.lo.

null.lo

A scalar representing the lower bound of null interval (indifference zone). Value must be finite.

null.hi

A scalar representing the upper bound of null interval (indifference zone). Value must be finite.

set.order

A numeric vector giving the desired order along the x-axis. If set.order is set to sgpv, the second-generation p-value ranking is used. If set.order is set to NA, the original input ordering is used.

x.show

A scalar representing the maximum ranking on the x-axis that is displayed. Default is to display all intervals.

null.col

Coloring of the null interval (indifference zone). Default is Hawkes Blue: rgb(208,216,232,maxColorValue=255).

int.col

Coloring of the intervals according to SGPV ranking. Default is c("cornflowerblue","firebrick3","darkslateblue") for SGPVs of 0, in (0,1), and 1 respectively.

int.pch

Plotting symbol for interval endpoints. Default is NA, no symbol. Use 16 for small endpoints.

int.cex

Size of plotting symbol for interval endpoints. Default is 0.4.

plot.axis

Toggle for default axis plotting. Default is c(TRUE,TRUE) for (x-axis,y-axis) respectively.

null.pt

A scalar representing a point null hypothesis. Default is NA. If set, the function will draw a horizontal dashed black line at this location.

outline.zone

Toggle for drawing a slim white outline around the null zone. Helpful visual aid when plotting many intervals. Default is TRUE.

title.lab

Title text.

x.lab

x-axis label.

y.lab

y-axis label.

legend.on

Toggle for plotting the legend. Default is TRUE.

Details

Use set.order to provide the classical p-value ranking. For example, if pvalue.vector is a vector of classical p-values, then set set.order=order(pvalue.vector) to sort the x-axis according to p-value rank.

Interval estimates with infinite or undefined limits should be manually truncated or avoided altogether. While the sgpvalue funciton will handle these cases, this function assumes they have been truncated or removed because there is no standard way to plot them.

References

Blume JD, Greevy RA Jr., Welty VF, Smith JR, Dupont WD (2019). An Introduction to Second-generation p-values. The American Statistician. 73:sup1, 157-167, DOI: https://doi.org/10.1080/00031305.2018.1537893

Blume JD, D’Agostino McGowan L, Dupont WD, Greevy RA Jr. (2018). Second-generation p-values: Improved rigor, reproducibility, & transparency in statistical analyses. PLoS ONE 13(3): e0188299. https://doi.org/10.1371/journal.pone.0188299

See Also

sgpvalue, sgpower, fdrisk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Use leukstats data
data(leukstats)
plotsgpv(est.lo=leukstats$ci.lo, est.hi=leukstats$ci.hi,
		null.lo=-0.3, null.hi=0.3,
		set.order=order(leukstats$p.value),
		x.show=7000,
		plot.axis=c("TRUE","FALSE"),
		null.pt=0, outline.zone=TRUE,
		title.lab="Leukemia Example", y.lab="Fold Change (base 10)",
		x.lab="Classical p-value ranking",
		legend.on=TRUE)
axis(side=2,at=round(log(c(1/1000,1/100,1/10,1/2,1,2,10,100,1000),
	base=10),2),labels=c("1/1000","1/100","1/10","1/2",1,2,10,100,1000),
	las=2)

weltybiostat/sgpv documentation built on Nov. 23, 2020, 11:35 p.m.