Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class of gsDesign2 and simtrial #457

Open
LittleBeannie opened this issue Aug 16, 2024 · 3 comments
Open

Class of gsDesign2 and simtrial #457

LittleBeannie opened this issue Aug 16, 2024 · 3 comments
Labels
question Further information is requested

Comments

@LittleBeannie
Copy link
Collaborator

LittleBeannie commented Aug 16, 2024

image

In the current version of gsDesign2, there are couple of classes.

  • fixed_design: this class is created for enabling S3 method for summarizing/integer fixed design table. It is suggested to keep this class, since the summarizing/integering fixed designs can be different from summarizing group sequential design.

  • gs_design: similar to the class above.

  • ahr: this class is created for enabling S3 method for integer AHR design, considering the to_integer method of AHR design is different from risk difference. I am wondering if we should divide in more details of the class, such as gs_design_ahr, gs_design_rd, etc. (code source: https://github.com/Merck/gsDesign2/blob/main/R/summary.R#L286C12-L286C23)

  • wlr: similar to the class above.

  • maxcombo : similar to the class above.

  • non_binding: this class can be set as attributes. (code source: https://github.com/Merck/gsDesign2/blob/main/R/gs_design_ahr.R#L379)

In the current version of simtrial, we have the class of

  • counting_process and tte_data: these 2 classes help with objects passing to the tests, which can be either a counting process, or a TTE dataset.
  • simtrial_gs_wlr: this class is created to summarize simulations with >=2 analyses. Maybe it is good we could keep this class short as sim_gs_wlr.
  • simtrial_fixed_wlr: this class is not currently available in simtrial, but would be useful in the future to summary simulations with 1 analysis only. Maybe it is good we could keep this class short as sim_fixed_wlr.
  • sim_gs_rmst: TBD
  • sim_fixed_rmst: TBD
  • sim_gs_milestone: TBD
  • sim_fixed_milestone: TBD

Two questions:

  1. Will additional classes be included in gsDesign2 or simtrial?
  2. Some keywords, such as 'gs', 'fixed', and 'wlr', are common to both gsDesign2 and simtrial. What is the recommended naming convention to distinguish classes from gsDesign2 or simtrial?
@LittleBeannie LittleBeannie added the question Further information is requested label Aug 16, 2024
@jdblischak
Copy link
Collaborator

I agree this is an important discussion to have. The class system in {gsDesign2} is complex.

Some additional high-level questions I have:

  1. How are the classes used? In other words, which classes have registered S3 methods, and which are detected inside of functions with inherits() or %in% class()? And for the latter, can we redesign the functions to use S3 methods instead of these ad-hoc class-specific code chunks?
  2. How are the classes related to each other? In other words, are some classes always accompanied by other classes, and thus are more like sub-classes? If yes, then this would inform the potential redesign from the previous point

@jdblischak
Copy link
Collaborator

Waiting on #461/#282 first for @yihui to refactor the summary() methods

@LittleBeannie
Copy link
Collaborator Author

Temporary suggestions:

simtrial classes

  • sim_fixed_ahr
  • sim_gs_ahr
  • sim_fixed_wlr
  • sim_gs_wlr

gsDesign2 classes

  • design_fixed_ahr
  • design_fixed_wlr
  • design_fixed_maxcombo
  • design_gs_ahr
  • design_gs_wlr
  • design_gs_maxcombo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants