Learn R Programming

ph2rand (version 0.1.0)

plot.ph2rand_pmf: Plot probability mass functions of a randomised clinical trial design that assumes a Bernoulli distributed primary outcome variable

Description

plot.ph2rand_pmf plots the terminal points of a design returned by pmf.

Usage

# S3 method for ph2rand_pmf
plot(x, output = FALSE, ...)

Arguments

x

An object of class ph2rand_pmf, as returned by pmf.

output

A logical variable indicating whether 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 plot in the slot $plot, which gives the produced plot of the terminal points.

See Also

des_one_stage, des_two_stage, pmf, plot.ph2rand_des.

Examples

Run this code
# NOT RUN {
# The default two-stage design
des <- des_two_stage()
# Its probability mass function under the uninteresting and interesting
# scenarios
pmf <- pmf(des)
# The plot of them
plot(pmf)
# The same probability mass functions, conditioning on the trial ending in
# stage 2
pmf <- pmf(des, k = 2)
# The plot of them
plot(pmf)
# }

Run the code above in your browser using DataLab