Learn R Programming

ph2rand (version 0.1.0)

terminal: Terminal points of a randomised clinical trial design that assumes a Bernoulli distributed primary outcome variable

Description

terminal determines the 'terminal' points of a design returned by des_one_stage or des_two_stage.

Usage

terminal(des = ph2rand::des_one_stage(), k = 1:des$J, summary = FALSE)

Arguments

des

An object of class ph2rand_des, as returned by des_one_stage or des_two_stage. Defaults to ph2rand::des_one_stage().

k

A numeric vector indicating which stages to consider when determining the terminal points. Defaults to 1:des$J (i.e., to all stages of the given design).

summary

A logical variable indicating whether a summary of the function's progress should be printed to the console. Defaults to FALSE.

Value

A list with additional class "ph2rand_terminal", containing each of the input parameters along with a tibble in the slot $terminal, which gives the determined terminal points.

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()
# Its terminal points across stages 1 and 2
term_12 <- terminal(des)
# Its terminal points from stage 2 only
term_2  <- terminal(des, 2)
# A plot of these points
plot(term_2)
# }

Run the code above in your browser using DataLab