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

Add ARD function to calculate cumulative counts #233

Open
edelarua opened this issue Nov 18, 2024 · 1 comment
Open

Add ARD function to calculate cumulative counts #233

edelarua opened this issue Nov 18, 2024 · 1 comment
Labels
ARD enhancement New feature or request sme

Comments

@edelarua
Copy link
Contributor

Create function to calculate statistics returned by tern::s_count_cumulative().

Given threshold(s), a direction (greater or less than), and whether to include the threshold value(s), return counts and fractions of values of a numeric variable in each given threshold.

See https://insightsengineering.github.io/tern/latest-tag/reference/count_cumulative.html for details on the tern function.

@edelarua edelarua added enhancement New feature or request sme ARD labels Nov 18, 2024
@ddsjoberg
Copy link
Collaborator

I think for now, we can split what that tern function did into two parts: the first does the preprocessing of creating a new variable with the thresholds supplied, and the second that returns the tabulations with the cumulative counts/percentages.

The first part we can skip for now, and for the second we'll update cards::ard_categorical() to optionally return cum_n and cum_p. This is being tracked in this issue FYI insightsengineering/cards#145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARD enhancement New feature or request sme
Projects
None yet
Development

No branches or pull requests

2 participants