Skip to content

Generate text summary as gsDesign #525

Closed
@LittleBeannie

Description

@LittleBeannie

In gsDesign, users can view a text summary of a design object:

> x <- gsSurv(lambdaC = .2, hr = .5, eta = .1, T = 2, minfup = 1.5)
> summary(x)
[1] "Asymmetric two-sided group sequential design with non-binding futility bound, 3 analyses, time-to-event outcome with sample size 460 and 97 events required, 90 percent power, 2.5 percent (1-sided) Type I error to detect a hazard ratio of 0.5. Enrollment and total study durations are assumed to be 0.5 and 2 months, respectively. Efficacy bounds derived using a Hwang-Shih-DeCani spending function with gamma = -4. Futility bounds derived using a Hwang-Shih-DeCani spending function with gamma = -2."

In gsDesign2, we will mimic the above approach to generate a text summary. Since summary is already an existing method in gsDesign2, I will temporarily name the new function text_summary. If we come up with a better naming proposal later, we can change it accordingly.

> x <- gs_design_ahr(...)
> text_summary(x)

Since we have both fixed designs (number of analyses = 1) and group sequential designs (number of analyses > 1), I am considering whether we should implement text_summary as an S3 method or simply use attributes. To avoid complicating things too much, I will start with the attributes approach, which can be extended to an S3 method if necessary. After that, I will pass it to @jdblischak for review and restructuring if needed.

References in gsDesign: https://github.com/keaven/gsDesign/blob/master/R/gsMethods.R#L69C1-L69C17

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions