plot_power_curve {RnaSeqSampleSize}R Documentation

plot_power_curve

Description

A function to plot power curves based on the result of sample_size or est_power_curve function.

Usage

plot_power_curve(result, cexLegend = 1, type = "b", xlab = "Sample Size",
  ylab = "Power", pch = 16, lwd = 3, las = 1, cex = 1.5,
  main = "Power Curve", col = "red")

Arguments

result

the result of sample_size or est_power_curve function. The storeProcess parameter should be set as True when performing sample_size function. If you want to plot more than one curves in the same figure, the results from sample_size function should first be combined into a new list. At most five curves were allowed in one figure.

cexLegend

the cex for legend.

type

1-character string giving the type of plot desired. The following values are possible, for details, see plot: "p" for points, "l" for lines, "b" for both points and lines, "c" for empty points joined by lines, "o" for overplotted points and lines, "s" and "S" for stair steps and "h" for histogram-like vertical lines. Finally, "n" does not produce any points or lines.

xlab

a label for the x axis, defaults to a description of x.

ylab

a label for the y axis, defaults to a description of y.

pch

Either an integer specifying a symbol or a single character to be used as the default in plotting points.

lwd

The line width.

las

Numeric in 0,1,2,3; the style of axis labels.

cex

A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default.

main

a main title for the plot, see also title.

col

The line color.

Examples

result1<-sample_size(rho=2,phi0=1,lambda0=1,f=0.01,power=0.8,m=20000,m1=500,showMessage=TRUE,storeProcess=TRUE)
result2<-sample_size(rho=4,phi0=1,lambda0=1,f=0.01,power=0.8,m=20000,m1=500,showMessage=TRUE,storeProcess=TRUE)
plot_power_curve(list(result1,result2))

[Package RnaSeqSampleSize version 1.16.0 Index]