plot: Plots

Description Usage Arguments Examples

Description

Plots statistical power, minimum detectable effect size (MDES), or MDES difference (MDESD) curves with (1-α)x100 % confidence interval.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
  ## S3 method for class 'power'
plot(x, ypar = "power",  xpar = NULL,
          xlim = NULL, ylim = NULL,
          xlab = NULL, ylab = NULL,
          main = NULL, sub = NULL,
          locate = FALSE, ...)

  ## S3 method for class 'mdes'
plot(x, ypar = "power",  xpar = NULL,
          xlim = NULL, ylim = NULL,
          xlab = NULL, ylab = NULL,
          main = NULL, sub = NULL,
          locate = FALSE, ...)

  ## S3 method for class 'mrss'
plot(x, ypar = "power",  xpar = NULL,
          xlim = NULL, ylim = NULL,
          xlab = NULL, ylab = NULL,
          main = NULL, sub = NULL,
          locate = FALSE, ...)

Arguments

x

an object returned from one of the PowerUpR functions.

ypar

character; "mdes" or "power" on y axis .

xpar

character; one of the sample sizes on x axis.

xlim

limits for xpar.

ylim

limits for ypar.

xlab

x axis label (ignored for objects returned from power.med211(), power.med221(), and power.med321() functions).

ylab

y axis label (ignored for objects returned from power.med211(), power.med221(), and power.med321() functions).

main

title for the plot (ignored for objects returned from power.med221() and power.med211() functions).

sub

subtitle for the plot (ignored for objects returned from power.med221() and power.med211() functions).

locate

logical; TRUE locates parameter values for design x on the plot.

...

other graphical parameters to pass to plot.new().

Examples

1
2
3
4
5
6
7
design1 <- mdes.cra3(rho3=.06, rho2=.17, n=15, J=3, K=60)
plot(design1, ypar = "mdes", xpar = "K", xlim = c(30, 100))
plot(design1, ypar = "power", xpar = "K", xlim = c(30, 100))

design2 <- power.cra3(es=.269, rho3=.06, rho2=.17, n=15, J=3, K=60)
plot(design2, ypar = "mdes", xpar = "K", xlim = c(30, 100))
plot(design2, ypar = "power", xpar = "K", xlim = c(30, 100))

PowerUpR documentation built on Oct. 25, 2021, 5:06 p.m.