plot.power.calc: Plotting a power.calc object

View source: R/plot.power.calc.R

plot.power.calcR Documentation

Plotting a power.calc object

Description

Plot the power between two groups as the number of participants and the relative risk vary.

Usage

    ## S3 method for class 'power.calc'
plot( x, col = "hotpink", lwd = 1.5, lty = 1, ylab = NULL, 
          x.legend = NULL, y.legend = NULL, main.legend = "Risk scaling", legend.size = 1, 
          target.power = NA, which = 1L, ... )
  

Arguments

x

An object of class power.calc.

col

Colour of the line.

lwd

Line width.

lty

Line type.

ylab

Title for the y-axis.

x.legend

The x position of the legend. If not given, tries to default to a sensible value.

y.legend

The y position of the legend. If not given, tries to default to a sensible value.

main.legend

Title for the legend.

legend.size

Size of the legend.

target.power

Add a horizontal dotted line at a target power. A value of NA suppresses plotting.

which

Type of plot. Value 1 gives a plot of power, and value 2 plot of estimated effect size.

...

Additional arguments to be passed to the plot function.

Author(s)

Rebecca Mangan and Jason Wyse


SimVitD documentation built on Aug. 20, 2023, 5:06 p.m.