Skip to content

Add argument formula to wlr() #323

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 1 commit into from
Apr 22, 2025
Merged

Conversation

jdblischak
Copy link
Collaborator

Closes #280

xref: #216, #276, #320, #321

This PR adds the argument formula to wlr(). This allows users to run wlr() on their time-to-event data set without having to rename their columns to match the output of one of the cutting functions.

I relaxed wlr.default() to not require the column strata. Instead, if it is missing, it adds it automatically for the user.

Also, note that there is the current limitation that the treatment arm must be called "treatment". This is due to this line in wlr.tte_data(). In order to make this more flexible, we'd have to add an argument arm to wlr().

x <- data |> counting_process(arm = "experimental")

@jdblischak jdblischak self-assigned this Apr 14, 2025
Copy link
Collaborator

@LittleBeannie LittleBeannie left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @jdblischak!

@LittleBeannie LittleBeannie merged commit 2dc0c1f into Merck:main Apr 22, 2025
9 checks passed
@jdblischak jdblischak deleted the wlr-formula branch April 22, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable formula to wlr()
2 participants