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 return ANCOVA results #235

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

Add ARD function to return ANCOVA results #235

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

Comments

@edelarua
Copy link
Contributor

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

Function summarizes results of emmeans::emmeans(stats::lm(formula)) and emmeans::contrast(fit, method = "trt.vs.ctrl") and should return the following statistics:

  • n: Count of complete sample size for the group.
  • lsmean: Estimated marginal means in the group.
  • lsmean_diff: Difference in estimated marginal means in comparison to the reference group.
  • lsmean_diff_ci: Confidence level for difference in estimated marginal means in comparison to the reference group.
  • pval: p-value (not adjusted for multiple comparisons).

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

@edelarua edelarua added enhancement New feature or request sme ARD labels Nov 19, 2024
@ayogasekaram ayogasekaram self-assigned this Nov 22, 2024
@ddsjoberg
Copy link
Collaborator

FYI, there is a function that returns lsmean_diff_ci in cardx (https://insightsengineering.github.io/cardx/main/reference/ard_emmeans_mean_difference.html). This function handles both continuous and binary endpoints. I don't know if it needs special handling for interaction terms?

I wonder if it's worth combining these functions or keeping two separate for LS mean and LS mean differences? Also, what should the name of the fn be? I think ANCOVA is too general, and I think I prefer something referencing LS means (also with our naming convention, it'll begin with ard_emmeans_*()

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

3 participants