Skip to content

Add RMST test #188

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

Merged
merged 21 commits into from
Feb 5, 2024
Merged

Add RMST test #188

merged 21 commits into from
Feb 5, 2024

Conversation

LittleBeannie
Copy link
Collaborator

@LittleBeannie LittleBeannie commented Feb 2, 2024

Closes #16

@LittleBeannie LittleBeannie added the development New feature or request label Feb 2, 2024
@LittleBeannie LittleBeannie self-assigned this Feb 2, 2024
@LittleBeannie LittleBeannie linked an issue Feb 2, 2024 that may be closed by this pull request
@LittleBeannie
Copy link
Collaborator Author

LittleBeannie commented Feb 2, 2024

The current rmst() function asks users to input the variable name of the tte ("time"), event indicator ("status"), grouping variable ("sex"), such as

lung |> 
  rmst(var_label_tte = "time",
       var_label_event = "status",
       var_label_group = "sex",
       tau = 10,
       reference = "female")

By mimic the survival R package, a better syntax may be

rmst(Surv(time, status) ~ sex, data = lung)

Any suggestions/comments?

References: survdiff(Surv(time, status) ~ sex, data = lung)

@LittleBeannie LittleBeannie requested a review from keaven February 2, 2024 17:51
Copy link
Collaborator

@nanxstats nanxstats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I rearranged the order of functions in rmst.R to put the exported functions first and then followed the call sequence, as recommended by the tidyverse style guide:

In a file that contains multiple functions, public functions and their documentation should appear first, with private functions appearing after all documented functions.


Can you please fix the following (small) issues before we merge? Thanks.

  1. df is defined in one_rmst() but not actually used. Can this be removed or is it intended to be used?
  2. The description of "A list of 3 data frames of RMST calculations (RMST, RMSTDIFF, ALL)" does not match the implementation.
  3. What does the "std" mean in "Variance, std, and CIs of the estimated RMST"? Maybe rephrase to make it clear.

@nanxstats nanxstats changed the title add rmst test Add RMST test Feb 5, 2024
@LittleBeannie
Copy link
Collaborator Author

Nice. I rearranged the order of functions in rmst.R to put the exported functions first and then followed the call sequence, as recommended by the tidyverse style guide:

In a file that contains multiple functions, public functions and their documentation should appear first, with private functions appearing after all documented functions.

Can you please fix the following (small) issues before we merge? Thanks.

  1. df is defined in one_rmst() but not actually used. Can this be removed or is it intended to be used?
  2. The description of "A list of 3 data frames of RMST calculations (RMST, RMSTDIFF, ALL)" does not match the implementation.
  3. What does the "std" mean in "Variance, std, and CIs of the estimated RMST"? Maybe rephrase to make it clear.

Hello @nanxstats , thank you for these valuable comments! I have addressed them in my latest commits. Please take a moment to review them and let me know if they are clear to you. Thank you!

Copy link
Collaborator

@nanxstats nanxstats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LittleBeannie Looking great! Let's merge this 😎

@nanxstats nanxstats merged commit a207c70 into main Feb 5, 2024
@nanxstats nanxstats deleted the 16-add-rmst branch February 5, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RMST
2 participants