Learn R Programming

PowerUpR (version 0.1.3)

plot.pars: Plots Duo or Trio Relationships between Statistical Power, MDES, MRSS, and COSA

Description

plot produces two or three dimensional plots (including contour plots) that delineate relationships between statisitcal power, MDES, MRSS and COSA for objects returned from one of the PowerUpR functions.

Usage

# S3 method for pars
plot(x, pars=c("power","mdes",NA), type="p",
       left.right.angle=30, up.down.angle=30, nlevels=10,
       mdes.seq=NULL, power.seq=NULL, mrss.seq=NULL,...)

Arguments

x
an object returned from one of the PowerUpR functions.
pars
character vector; valid values are "mdes", "power", and depending on the design, any one of the "n", "J", "K", or "L". Default vector c("power","mdes",NA) produces a three dimensional plot where NA is replaced by top level sample size. To override the default user should replace NA with any one of the "n", "J", "K", or "L". Including only two parameters produces two dimensional plot. One of the parameters must be either "mdes", or "power".
type
character value; "p" for plot, "c" for contour.
left.right.angle
numeric value; rotates 3D graph from left to right.
up.down.angle
numeric value; rotates 3D graph from up to down.
nlevels
number of contour levels.
mdes.seq
sequence for MDES.
power.seq
sequence for power.
mrss.seq
sequence for MRSS.
...
other graphical parameters.

Details

plot.pars produces plots for MDES, power, MRSS, and COSA using objects returned from PowerUpR functions. User can plot 2D, 3D or contour plots by specifying pars and type arguments. By default object returned from mdes functions produces plots where MDES is on top axis (either y or z), similarly, object returned from power functions produces plots where power is on top axis (either y or z). However user can switch between mdes and power functions to obtain an alternative plot. For objects returned from mrss or optimal functions by default MDES is on top axis (either y or z). User can change this by specifying pars arguments where its first argument matches with parameter to be plotted on top axis (either y or z).

See Also

t1t2.error, contour, persp, plot

Examples

Run this code
## Not run: ------------------------------------
# 
#      design1 <- mdes.bira2r1(rho2=.35, omega2=.10,
#                             n=83, J=480)
#      # MDES against power & J (3D plot)
#      plot(design1)
#      # MDES against power & J (contour plot)
#      plot(design1, type="c")
#      # MDES against J (2D plot)
#      plot(design1, pars=c("mdes","J"))
# 
#   
## ---------------------------------------------

Run the code above in your browser using DataLab