Learn R Programming

PowerUpR (version 1.0.1)

plots: Plots

Description

Plots statistical power or minimum detectable effect size curves with (1-\(\alpha\))x100 % confidence interval.

Usage

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

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

# S3 method for mrss plot(x, ypar = "mdes", 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.

ylab

y axis label.

main

title for the plot.

sub

subtitle for the plot.

locate

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

...

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

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", xlim = c(30, 100))
plot(design1, ypar = "power", xpar = "K", xlim = c(30, 100))

design2 <- power.cra3r3(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))
# }

Run the code above in your browser using DataLab