Learn R Programming

PowerUpR (version 0.2.3)

plots: Plots

Description

plot plots power or MDES curves.

Usage

# S3 method for power
plot(x, ypar = "power", xpar, xseq, ...)
  # S3 method for mdes
plot(x, ypar = "power", xpar, xseq, ...)
  # S3 method for mrss
plot(x, ypar = "power", xpar, xseq, ...)

Arguments

x

an object returned from one of the PowerUpR functions.

ypar

character; "mdes", or "power".

xpar

character; one of the sample sizes.

xseq

sequence for xpar.

...

other graphical parameters.

Examples

Run this code
# NOT RUN {
design1 <- mdes.cra3r3(rho3=.06, rho2=.17, n=15, J=3, K=60)
plot(design1, ypar = "mdes", xpar = "K", xseq = 30:100)
plot(design1, ypar = "power", xpar = "K", xseq = 30:100)

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

design3 <- mrss.cra3r3(es=.269, rho3=.06, rho2=.17, n=15, J=3)
plot(design3, ypar = "mdes", xpar = "K", xseq = 30:100)
plot(design3, ypar = "power", xpar = "K", xseq = 30:100)
# }

Run the code above in your browser using DataLab