plot_power_curve: plot_power_curve

Description Usage Arguments Value Examples

View source: R/curve.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

1
2
3
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))

RnaSeqSampleSize documentation built on Nov. 8, 2020, 6:54 p.m.