plot_power_curve: plot_power_curve

View source: R/curve.R

plot_power_curveR 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.

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

col

The line color.

Value

A power curve plot.

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))

slzhao/RnaSeqSampleSize documentation built on March 24, 2022, 2:21 a.m.