Learn R Programming

ph2rand (version 0.1.0)

plot.ph2rand_des: Plot the operating characteristics of a randomised clinical trial design that assumes a Bernoulli distributed primary outcome variable

Description

plot.ph2rand_des plots the operating characteristics of a design returned by des_one_stage or des_two_stage, under a range of key response rate scenarios. For convenience, it also calls plot.ph2rand_terminal to plot the terminal points of the design.

Usage

# S3 method for ph2rand_des
plot(x, k = 1:x$J, output = FALSE, ...)

Arguments

x

An object of class ph2rand_des, as returned by des_one_stage or des_two_stage.

k

A numeric vector indicating which stages to consider in determining the probability mass function. That is, it will condition the calculations on the trial ending in the stages given in k. Defaults to 1:des$J (i.e., to all stages of the given design).

output

A logical variable indicating whether available outputs should be returned by the function.

...

Not currently used.

Value

If output = TRUE, a list containing each of the input parameters along with a list in the slot $plots, which gives all of the available produced plots.

See Also

des_one_stage, des_two_stage, plot.ph2rand_terminal.

Examples

Run this code
# NOT RUN {
# The default two-stage design
des   <- des_two_stage()
# Print several key plots
plot(des)
# Determine and store all available plots
plots <- plot(des, output = TRUE)
# }

Run the code above in your browser using DataLab