From 9add5c1d335ee8ee91f182d7c09524232ed68dcf Mon Sep 17 00:00:00 2001 From: ddsjoberg Date: Fri, 3 May 2024 23:28:04 +0000 Subject: [PATCH] [actions skip] Built site for cardx@817694d4f225fe65952e8d73e4bf870b4d83974b --- main/404.html | 8 ++++++++ main/CODE_OF_CONDUCT.html | 8 ++++++++ main/CONTRIBUTING.html | 8 ++++++++ main/LICENSE-text.html | 8 ++++++++ main/PULL_REQUEST_TEMPLATE.html | 8 ++++++++ main/SECURITY.html | 8 ++++++++ main/authors.html | 8 ++++++++ main/index.html | 8 ++++++++ main/news/index.html | 8 ++++++++ main/reference/ard_aod_wald_test.html | 8 ++++++++ main/reference/ard_car_anova.html | 8 ++++++++ main/reference/ard_car_vif.html | 8 ++++++++ main/reference/ard_effectsize_cohens_d.html | 8 ++++++++ main/reference/ard_effectsize_hedges_g.html | 8 ++++++++ main/reference/ard_emmeans_mean_difference.html | 8 ++++++++ main/reference/ard_proportion_ci.html | 8 ++++++++ main/reference/ard_regression.html | 8 ++++++++ main/reference/ard_regression_basic.html | 8 ++++++++ main/reference/ard_smd_smd.html | 8 ++++++++ main/reference/ard_stats_anova.html | 8 ++++++++ main/reference/ard_stats_aov.html | 8 ++++++++ main/reference/ard_stats_chisq_test.html | 8 ++++++++ main/reference/ard_stats_fisher_test.html | 8 ++++++++ main/reference/ard_stats_kruskal_test.html | 8 ++++++++ main/reference/ard_stats_mcnemar_test.html | 8 ++++++++ main/reference/ard_stats_mood_test.html | 8 ++++++++ main/reference/ard_stats_oneway_test.html | 8 ++++++++ main/reference/ard_stats_prop_test.html | 8 ++++++++ main/reference/ard_stats_t_test.html | 8 ++++++++ main/reference/ard_stats_wilcox_test.html | 8 ++++++++ main/reference/ard_survey_svychisq.html | 8 ++++++++ main/reference/ard_survey_svycontinuous.html | 8 ++++++++ main/reference/ard_survey_svyranktest.html | 8 ++++++++ main/reference/ard_survey_svyttest.html | 8 ++++++++ main/reference/ard_survival_survdiff.html | 8 ++++++++ main/reference/ard_survival_survfit.html | 8 ++++++++ main/reference/cardx-package.html | 8 ++++++++ main/reference/construction_helpers.html | 8 ++++++++ main/reference/dot-extract_wald_results.html | 8 ++++++++ main/reference/dot-format_cohens_d_results.html | 8 ++++++++ main/reference/dot-format_hedges_g_results.html | 8 ++++++++ main/reference/dot-format_mcnemartest_results.html | 8 ++++++++ main/reference/dot-format_moodtest_results.html | 8 ++++++++ main/reference/dot-format_proptest_results.html | 8 ++++++++ main/reference/dot-format_survfit_results.html | 8 ++++++++ main/reference/dot-format_ttest_results.html | 8 ++++++++ main/reference/dot-format_wilcoxtest_results.html | 8 ++++++++ main/reference/dot-paired_data_pivot_wider.html | 8 ++++++++ main/reference/dot-process_survfit_probs.html | 8 ++++++++ main/reference/dot-process_survfit_time.html | 8 ++++++++ main/reference/dot-strata_normal_quantile.html | 8 ++++++++ main/reference/dot-update_weights_strat_wilson.html | 8 ++++++++ main/reference/index.html | 8 ++++++++ main/reference/proportion_ci.html | 8 ++++++++ main/reference/reexports.html | 8 ++++++++ main/search.json | 2 +- pkgdown.yml | 2 +- 57 files changed, 442 insertions(+), 2 deletions(-) diff --git a/main/404.html b/main/404.html index a1742338..2a591307 100644 --- a/main/404.html +++ b/main/404.html @@ -47,6 +47,14 @@ + + diff --git a/main/CONTRIBUTING.html b/main/CONTRIBUTING.html index 262b3707..d15c8c83 100644 --- a/main/CONTRIBUTING.html +++ b/main/CONTRIBUTING.html @@ -24,6 +24,14 @@ + + diff --git a/main/LICENSE-text.html b/main/LICENSE-text.html index b5c39629..fed19cc0 100644 --- a/main/LICENSE-text.html +++ b/main/LICENSE-text.html @@ -24,6 +24,14 @@ + + diff --git a/main/PULL_REQUEST_TEMPLATE.html b/main/PULL_REQUEST_TEMPLATE.html index 9e02ac14..4f6f8589 100644 --- a/main/PULL_REQUEST_TEMPLATE.html +++ b/main/PULL_REQUEST_TEMPLATE.html @@ -24,6 +24,14 @@ + + diff --git a/main/SECURITY.html b/main/SECURITY.html index 82cd1b56..05754453 100644 --- a/main/SECURITY.html +++ b/main/SECURITY.html @@ -24,6 +24,14 @@ + + diff --git a/main/authors.html b/main/authors.html index 4dc87d1a..f3cbcb0e 100644 --- a/main/authors.html +++ b/main/authors.html @@ -24,6 +24,14 @@ + + diff --git a/main/index.html b/main/index.html index 6c690c0d..005f8c76 100644 --- a/main/index.html +++ b/main/index.html @@ -49,6 +49,14 @@ + + diff --git a/main/reference/ard_aod_wald_test.html b/main/reference/ard_aod_wald_test.html index ffb9c8ab..ffa257dd 100644 --- a/main/reference/ard_aod_wald_test.html +++ b/main/reference/ard_aod_wald_test.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_car_anova.html b/main/reference/ard_car_anova.html index a403414b..eadb9b33 100644 --- a/main/reference/ard_car_anova.html +++ b/main/reference/ard_car_anova.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/ard_car_vif.html b/main/reference/ard_car_vif.html index d60a26dc..ffc760ff 100644 --- a/main/reference/ard_car_vif.html +++ b/main/reference/ard_car_vif.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_effectsize_cohens_d.html b/main/reference/ard_effectsize_cohens_d.html index 84b89fbe..86c0e16a 100644 --- a/main/reference/ard_effectsize_cohens_d.html +++ b/main/reference/ard_effectsize_cohens_d.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_effectsize_hedges_g.html b/main/reference/ard_effectsize_hedges_g.html index 080cc7f5..8f36b49d 100644 --- a/main/reference/ard_effectsize_hedges_g.html +++ b/main/reference/ard_effectsize_hedges_g.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_emmeans_mean_difference.html b/main/reference/ard_emmeans_mean_difference.html index badfab48..3292de73 100644 --- a/main/reference/ard_emmeans_mean_difference.html +++ b/main/reference/ard_emmeans_mean_difference.html @@ -38,6 +38,14 @@ + + diff --git a/main/reference/ard_proportion_ci.html b/main/reference/ard_proportion_ci.html index 659eab52..c6b81203 100644 --- a/main/reference/ard_proportion_ci.html +++ b/main/reference/ard_proportion_ci.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_regression.html b/main/reference/ard_regression.html index 001513fa..947375fc 100644 --- a/main/reference/ard_regression.html +++ b/main/reference/ard_regression.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_regression_basic.html b/main/reference/ard_regression_basic.html index 5497faa4..8437c70d 100644 --- a/main/reference/ard_regression_basic.html +++ b/main/reference/ard_regression_basic.html @@ -48,6 +48,14 @@ + + diff --git a/main/reference/ard_smd_smd.html b/main/reference/ard_smd_smd.html index 43f726fc..b2e18623 100644 --- a/main/reference/ard_smd_smd.html +++ b/main/reference/ard_smd_smd.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/ard_stats_anova.html b/main/reference/ard_stats_anova.html index b4e5febc..327cd9a7 100644 --- a/main/reference/ard_stats_anova.html +++ b/main/reference/ard_stats_anova.html @@ -30,6 +30,14 @@ + + diff --git a/main/reference/ard_stats_aov.html b/main/reference/ard_stats_aov.html index 1e808f9b..72cfbe70 100644 --- a/main/reference/ard_stats_aov.html +++ b/main/reference/ard_stats_aov.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_stats_chisq_test.html b/main/reference/ard_stats_chisq_test.html index 3a38c0d3..2a16fbad 100644 --- a/main/reference/ard_stats_chisq_test.html +++ b/main/reference/ard_stats_chisq_test.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_stats_fisher_test.html b/main/reference/ard_stats_fisher_test.html index 2ae2951a..ea8ad687 100644 --- a/main/reference/ard_stats_fisher_test.html +++ b/main/reference/ard_stats_fisher_test.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_stats_kruskal_test.html b/main/reference/ard_stats_kruskal_test.html index 464b0228..471841e0 100644 --- a/main/reference/ard_stats_kruskal_test.html +++ b/main/reference/ard_stats_kruskal_test.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_stats_mcnemar_test.html b/main/reference/ard_stats_mcnemar_test.html index 926faf38..f39fc31c 100644 --- a/main/reference/ard_stats_mcnemar_test.html +++ b/main/reference/ard_stats_mcnemar_test.html @@ -34,6 +34,14 @@ + + diff --git a/main/reference/ard_stats_mood_test.html b/main/reference/ard_stats_mood_test.html index 829f8bc7..e3529852 100644 --- a/main/reference/ard_stats_mood_test.html +++ b/main/reference/ard_stats_mood_test.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_stats_oneway_test.html b/main/reference/ard_stats_oneway_test.html index 6c32e3de..c1de9880 100644 --- a/main/reference/ard_stats_oneway_test.html +++ b/main/reference/ard_stats_oneway_test.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_stats_prop_test.html b/main/reference/ard_stats_prop_test.html index 5ef119bf..45ffb376 100644 --- a/main/reference/ard_stats_prop_test.html +++ b/main/reference/ard_stats_prop_test.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/ard_stats_t_test.html b/main/reference/ard_stats_t_test.html index a0622ad5..38d0bbc7 100644 --- a/main/reference/ard_stats_t_test.html +++ b/main/reference/ard_stats_t_test.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/ard_stats_wilcox_test.html b/main/reference/ard_stats_wilcox_test.html index 0c1b83fc..de756084 100644 --- a/main/reference/ard_stats_wilcox_test.html +++ b/main/reference/ard_stats_wilcox_test.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/ard_survey_svychisq.html b/main/reference/ard_survey_svychisq.html index 99462622..9b682de4 100644 --- a/main/reference/ard_survey_svychisq.html +++ b/main/reference/ard_survey_svychisq.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/ard_survey_svycontinuous.html b/main/reference/ard_survey_svycontinuous.html index 986f0d1a..a386f45a 100644 --- a/main/reference/ard_survey_svycontinuous.html +++ b/main/reference/ard_survey_svycontinuous.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/ard_survey_svyranktest.html b/main/reference/ard_survey_svyranktest.html index 27302c77..5fb39fc3 100644 --- a/main/reference/ard_survey_svyranktest.html +++ b/main/reference/ard_survey_svyranktest.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/ard_survey_svyttest.html b/main/reference/ard_survey_svyttest.html index e946fe67..736d0772 100644 --- a/main/reference/ard_survey_svyttest.html +++ b/main/reference/ard_survey_svyttest.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/ard_survival_survdiff.html b/main/reference/ard_survival_survdiff.html index e3947534..71f99e50 100644 --- a/main/reference/ard_survival_survdiff.html +++ b/main/reference/ard_survival_survdiff.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/ard_survival_survfit.html b/main/reference/ard_survival_survfit.html index 3687bc22..2e8cb156 100644 --- a/main/reference/ard_survival_survfit.html +++ b/main/reference/ard_survival_survfit.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/cardx-package.html b/main/reference/cardx-package.html index a4f5a1e3..a52fc4bd 100644 --- a/main/reference/cardx-package.html +++ b/main/reference/cardx-package.html @@ -26,6 +26,14 @@ + + diff --git a/main/reference/construction_helpers.html b/main/reference/construction_helpers.html index 4c3b6e25..5541352d 100644 --- a/main/reference/construction_helpers.html +++ b/main/reference/construction_helpers.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-extract_wald_results.html b/main/reference/dot-extract_wald_results.html index c0cd18fe..9be29f50 100644 --- a/main/reference/dot-extract_wald_results.html +++ b/main/reference/dot-extract_wald_results.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-format_cohens_d_results.html b/main/reference/dot-format_cohens_d_results.html index 1f86158f..994c4496 100644 --- a/main/reference/dot-format_cohens_d_results.html +++ b/main/reference/dot-format_cohens_d_results.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-format_hedges_g_results.html b/main/reference/dot-format_hedges_g_results.html index 17ae89fe..38d34fc5 100644 --- a/main/reference/dot-format_hedges_g_results.html +++ b/main/reference/dot-format_hedges_g_results.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-format_mcnemartest_results.html b/main/reference/dot-format_mcnemartest_results.html index 781c221f..2a4e1d03 100644 --- a/main/reference/dot-format_mcnemartest_results.html +++ b/main/reference/dot-format_mcnemartest_results.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-format_moodtest_results.html b/main/reference/dot-format_moodtest_results.html index f68c41e3..542c2be2 100644 --- a/main/reference/dot-format_moodtest_results.html +++ b/main/reference/dot-format_moodtest_results.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-format_proptest_results.html b/main/reference/dot-format_proptest_results.html index 3a84c0e7..84020ca2 100644 --- a/main/reference/dot-format_proptest_results.html +++ b/main/reference/dot-format_proptest_results.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-format_survfit_results.html b/main/reference/dot-format_survfit_results.html index 6f27daee..9fd08c72 100644 --- a/main/reference/dot-format_survfit_results.html +++ b/main/reference/dot-format_survfit_results.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-format_ttest_results.html b/main/reference/dot-format_ttest_results.html index cf6281b6..bc9c9cce 100644 --- a/main/reference/dot-format_ttest_results.html +++ b/main/reference/dot-format_ttest_results.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-format_wilcoxtest_results.html b/main/reference/dot-format_wilcoxtest_results.html index fac5a70f..cbfe04b8 100644 --- a/main/reference/dot-format_wilcoxtest_results.html +++ b/main/reference/dot-format_wilcoxtest_results.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-paired_data_pivot_wider.html b/main/reference/dot-paired_data_pivot_wider.html index a4b00604..77b7694d 100644 --- a/main/reference/dot-paired_data_pivot_wider.html +++ b/main/reference/dot-paired_data_pivot_wider.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-process_survfit_probs.html b/main/reference/dot-process_survfit_probs.html index 56658a05..07d45e87 100644 --- a/main/reference/dot-process_survfit_probs.html +++ b/main/reference/dot-process_survfit_probs.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-process_survfit_time.html b/main/reference/dot-process_survfit_time.html index eb264d37..19f6e460 100644 --- a/main/reference/dot-process_survfit_time.html +++ b/main/reference/dot-process_survfit_time.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/dot-strata_normal_quantile.html b/main/reference/dot-strata_normal_quantile.html index 9e46d1f1..d89ed051 100644 --- a/main/reference/dot-strata_normal_quantile.html +++ b/main/reference/dot-strata_normal_quantile.html @@ -28,6 +28,14 @@ + + diff --git a/main/reference/dot-update_weights_strat_wilson.html b/main/reference/dot-update_weights_strat_wilson.html index bc8edd34..b5b3b509 100644 --- a/main/reference/dot-update_weights_strat_wilson.html +++ b/main/reference/dot-update_weights_strat_wilson.html @@ -28,6 +28,14 @@ + + diff --git a/main/reference/index.html b/main/reference/index.html index c2004818..14c7830e 100644 --- a/main/reference/index.html +++ b/main/reference/index.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/proportion_ci.html b/main/reference/proportion_ci.html index e57c2ace..61824d7d 100644 --- a/main/reference/proportion_ci.html +++ b/main/reference/proportion_ci.html @@ -24,6 +24,14 @@ + + diff --git a/main/reference/reexports.html b/main/reference/reexports.html index da5dbfe2..ce103d6b 100644 --- a/main/reference/reexports.html +++ b/main/reference/reexports.html @@ -38,6 +38,14 @@ + + diff --git a/main/search.json b/main/search.json index abdcbc08..e4fcf898 100644 --- a/main/search.json +++ b/main/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/cardx/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/cardx/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/cardx/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/cardx/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Daniel Sjoberg. Author, maintainer. Abinaya Yogasekaram. Author. Emily de la Rua. Author. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/cardx/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Sjoberg D, Yogasekaram , de la Rua E (2024). cardx: Extra Analysis Results Data Utilities. R package version 0.1.0.9033, https://github.com/insightsengineering/cardx.","code":"@Manual{, title = {cardx: Extra Analysis Results Data Utilities}, author = {Daniel Sjoberg and Abinaya Yogasekaram and Emily {de la Rua}}, year = {2024}, note = {R package version 0.1.0.9033}, url = {https://github.com/insightsengineering/cardx}, }"},{"path":"https://insightsengineering.github.io/cardx/index.html","id":"cardx-","dir":"","previous_headings":"","what":"Extra Analysis Results Data Utilities","title":"Extra Analysis Results Data Utilities","text":"{cardx} package extension {cards} package, providing additional functions create Analysis Results Data Objects (ARDs) using R programming language. {cardx} package exports ARD functions uses utility functions {cards} statistical functions additional packages (, {stats}, {mmrm}, {emmeans}, {car}, {survey}, etc.) construct summary objects. Summary objects can used : Generate Tables visualizations Regulatory Submission easily R. Perfect presenting descriptive statistics, statistical analyses, regressions, etc. . Conduct Quality Control checks existing Tables R. Storing results test parameters supports re-use verification data analyses.","code":""},{"path":"https://insightsengineering.github.io/cardx/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Extra Analysis Results Data Utilities","text":"Install cards CRAN : can install development version cards GitHub :","code":"install.packages(\"cardx\") # install.packages(\"devtools\") devtools::install_github(\"insightsengineering/cardx\")"},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/index.html","id":"example-ard-creation","dir":"","previous_headings":"Examples","what":"Example ARD Creation","title":"Extra Analysis Results Data Utilities","text":"Example t-test: Note returned ARD contains analysis results addition function parameters used calculate results allowing reproducible future analyses customization.","code":"library(cardx) cards::ADSL |> # keep two treatment arms for the t-test calculation dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> cardx::ard_stats_t_test(by = ARM, variable = AGE) ## {cards} data frame: 14 x 9 ## group1 variable context stat_name stat_label stat ## 1 ARM AGE stats_t_… estimate Mean Dif… 0.828 ## 2 ARM AGE stats_t_… estimate1 Group 1 … 75.209 ## 3 ARM AGE stats_t_… estimate2 Group 2 … 74.381 ## 4 ARM AGE stats_t_… statistic t Statis… 0.655 ## 5 ARM AGE stats_t_… p.value p-value 0.513 ## 6 ARM AGE stats_t_… parameter Degrees … 167.362 ## 7 ARM AGE stats_t_… conf.low CI Lower… -1.668 ## 8 ARM AGE stats_t_… conf.high CI Upper… 3.324 ## 9 ARM AGE stats_t_… method method Welch Tw… ## 10 ARM AGE stats_t_… alternative alternat… two.sided ## 11 ARM AGE stats_t_… mu H0 Mean 0 ## 12 ARM AGE stats_t_… paired Paired t… FALSE ## 13 ARM AGE stats_t_… var.equal Equal Va… FALSE ## 14 ARM AGE stats_t_… conf.level CI Confi… 0.95 ## ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/index.html","id":"model-input","dir":"","previous_headings":"Examples","what":"Model Input","title":"Extra Analysis Results Data Utilities","text":"{cardx} functions accept regression model objects input: Note Analysis Results Standard begin data set rather model object. accomplish include model construction helpers.","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_aod_wald_test() construct_model( x = cards::ADSL, formula = reformulate2(\"ARM\", response = \"AGE\"), method = \"lm\" ) |> ard_aod_wald_test() ## {cards} data frame: 6 x 8 ## variable context stat_name stat_label stat fmt_fn ## 1 (Intercept) aod_wald… df Degrees … 1 1 ## 2 (Intercept) aod_wald… statistic Statistic 7126.713 1 ## 3 (Intercept) aod_wald… p.value p-value 0 1 ## 4 ARM aod_wald… df Degrees … 2 1 ## 5 ARM aod_wald… statistic Statistic 1.046 1 ## 6 ARM aod_wald… p.value p-value 0.593 1 ## ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/index.html","id":"additional-resources","dir":"","previous_headings":"","what":"Additional Resources","title":"Extra Analysis Results Data Utilities","text":"best resources help documents accompanying {cardx} function. Supporting documentation companion packages {cards} {gtsummary} useful understanding ARD workflow capabilities.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_aod_wald_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Wald Test — ard_aod_wald_test","title":"ARD Wald Test — ard_aod_wald_test","text":"Function takes regression model object calculates Wald statistical test using aod::wald.test().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_aod_wald_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Wald Test — ard_aod_wald_test","text":"","code":"ard_aod_wald_test(x, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_aod_wald_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Wald Test — ard_aod_wald_test","text":"x regression model object ... arguments passed aod::wald.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_aod_wald_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Wald Test — ard_aod_wald_test","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_aod_wald_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Wald Test — ard_aod_wald_test","text":"","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_aod_wald_test() #> {cards} data frame: 6 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 (Intercept) aod_wald… df Degrees … 1 1 #> 2 (Intercept) aod_wald… statistic Statistic 7126.713 1 #> 3 (Intercept) aod_wald… p.value p-value 0 1 #> 4 ARM aod_wald… df Degrees … 2 1 #> 5 ARM aod_wald… statistic Statistic 1.046 1 #> 6 ARM aod_wald… p.value p-value 0.593 1 #> ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_anova.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD ANOVA from car Package — ard_car_anova","title":"ARD ANOVA from car Package — ard_car_anova","text":"Function takes regression model object calculated ANOVA using car::Anova().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD ANOVA from car Package — ard_car_anova","text":"","code":"ard_car_anova(x, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD ANOVA from car Package — ard_car_anova","text":"x regression model object ... arguments passed car::Anova(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD ANOVA from car Package — ard_car_anova","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_anova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD ANOVA from car Package — ard_car_anova","text":"","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_car_anova() #> {cards} data frame: 5 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 ARM car_anova sumsq sumsq 71.386 1 #> 2 ARM car_anova df Degrees … 2 1 #> 3 ARM car_anova meansq meansq 35.693 1 #> 4 ARM car_anova statistic Statistic 0.523 1 #> 5 ARM car_anova p.value p-value 0.593 1 #> ℹ 2 more variables: warning, error glm(vs ~ factor(cyl) + factor(am), data = mtcars, family = binomial) |> ard_car_anova(test.statistic = \"Wald\") #> {cards} data frame: 6 x 8 #> variable context stat_name stat_label stat warning #> 1 factor(cyl) car_anova statistic Statistic 0 glm.fit:… #> 2 factor(cyl) car_anova df Degrees … 2 glm.fit:… #> 3 factor(cyl) car_anova p.value p-value 1 glm.fit:… #> 4 factor(am) car_anova statistic Statistic 0 glm.fit:… #> 5 factor(am) car_anova df Degrees … 1 glm.fit:… #> 6 factor(am) car_anova p.value p-value 0.998 glm.fit:… #> ℹ 2 more variables: fmt_fn, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_vif.html","id":null,"dir":"Reference","previous_headings":"","what":"Regression VIF ARD — ard_car_vif","title":"Regression VIF ARD — ard_car_vif","text":"Function takes regression model object returns variance inflation factor (VIF) using car::vif() converts ARD structure","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_vif.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regression VIF ARD — ard_car_vif","text":"","code":"ard_car_vif(x, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_vif.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regression VIF ARD — ard_car_vif","text":"x regression model object See car::vif() details ... arguments passed car::vif(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_vif.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Regression VIF ARD — ard_car_vif","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_car_vif.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Regression VIF ARD — ard_car_vif","text":"","code":"lm(AGE ~ ARM + SEX, data = cards::ADSL) |> ard_car_vif() #> {cards} data frame: 6 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 ARM car_vif GVIF GVIF 1.016 1 #> 2 ARM car_vif df df 2 1 #> 3 ARM car_vif aGVIF Adjusted… 1.004 1 #> 4 SEX car_vif GVIF GVIF 1.016 1 #> 5 SEX car_vif df df 1 1 #> 6 SEX car_vif aGVIF Adjusted… 1.008 1 #> ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_cohens_d.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Cohen's D Test — ard_effectsize_cohens_d","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"Analysis results data paired non-paired Cohen's D Effect Size Test using effectsize::cohens_d().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_cohens_d.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"","code":"ard_effectsize_cohens_d(data, by, variables, conf.level = 0.95, ...) ard_effectsize_paired_cohens_d(data, by, variables, id, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_cohens_d.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"data (data.frame) data frame. See details. (tidy-select) column name compare . Must categorical variable exactly two levels. variables (tidy-select) column names compared. Must continuous variables. Independent tests run variable. conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed effectsize::cohens_d(...) id (tidy-select) column name subject participant ID","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_cohens_d.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_cohens_d.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"ard_effectsize_cohens_d() function, data expected one row per subject. data passed effectsize::cohens_d(data[[variable]]~data[[]], data, paired = FALSE, ...). ard_effectsize_paired_cohens_d() function, data expected one row per subject per level. effect size calculated, data reshaped wide format one row per subject. data passed effectsize::cohens_d(x = data_wide[[]], y = data_wide[[]], paired = TRUE, ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_cohens_d.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"","code":"cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_effectsize_cohens_d(by = ARM, variables = AGE) #> {cards} data frame: 8 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE effectsi… estimate Effect S… 0.1 #> 2 ARM AGE effectsi… conf.level CI Confi… 0.95 #> 3 ARM AGE effectsi… conf.low CI Lower… -0.201 #> 4 ARM AGE effectsi… conf.high CI Upper… 0.401 #> 5 ARM AGE effectsi… mu H0 Mean 0 #> 6 ARM AGE effectsi… paired Paired t… FALSE #> 7 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 8 ARM AGE effectsi… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error # constructing a paired data set, # where patients receive both treatments cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> dplyr::group_by(USUBJID) |> dplyr::filter(dplyr::n() > 1) |> ard_effectsize_paired_cohens_d(by = ARM, variables = AGE, id = USUBJID) #> {cards} data frame: 8 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE effectsi… estimate Effect S… 0.069 #> 2 ARM AGE effectsi… conf.level CI Confi… 0.95 #> 3 ARM AGE effectsi… conf.low CI Lower… -0.146 #> 4 ARM AGE effectsi… conf.high CI Upper… 0.282 #> 5 ARM AGE effectsi… mu H0 Mean 0 #> 6 ARM AGE effectsi… paired Paired t… TRUE #> 7 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 8 ARM AGE effectsi… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_hedges_g.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Hedge's G Test — ard_effectsize_hedges_g","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"Analysis results data paired non-paired Hedge's G Effect Size Test using effectsize::hedges_g().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_hedges_g.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"","code":"ard_effectsize_hedges_g(data, by, variables, conf.level = 0.95, ...) ard_effectsize_paired_hedges_g(data, by, variables, id, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_hedges_g.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"data (data.frame) data frame. See details. (tidy-select) column name compare . Must categorical variable exactly two levels. variables (tidy-select) column names compared. Must continuous variable. Independent tests run variable conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed effectsize::hedges_g(...) id (tidy-select) column name subject participant ID","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_hedges_g.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_hedges_g.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"ard_effectsize_hedges_g() function, data expected one row per subject. data passed effectsize::hedges_g(data[[variable]]~data[[]], data, paired = FALSE, ...). ard_effectsize_paired_hedges_g() function, data expected one row per subject per level. effect size calculated, data reshaped wide format one row per subject. data passed effectsize::hedges_g(x = data_wide[[]], y = data_wide[[]], paired = TRUE, ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_effectsize_hedges_g.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"","code":"cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_effectsize_hedges_g(by = ARM, variables = AGE) #> {cards} data frame: 8 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE effectsi… estimate Effect S… 0.1 #> 2 ARM AGE effectsi… conf.level CI Confi… 0.95 #> 3 ARM AGE effectsi… conf.low CI Lower… -0.2 #> 4 ARM AGE effectsi… conf.high CI Upper… 0.399 #> 5 ARM AGE effectsi… mu H0 Mean 0 #> 6 ARM AGE effectsi… paired Paired t… FALSE #> 7 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 8 ARM AGE effectsi… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error # constructing a paired data set, # where patients receive both treatments cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> dplyr::group_by(USUBJID) |> dplyr::filter(dplyr::n() > 1) |> ard_effectsize_paired_hedges_g(by = ARM, variables = AGE, id = USUBJID) #> {cards} data frame: 8 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE effectsi… estimate Effect S… 0.068 #> 2 ARM AGE effectsi… conf.level CI Confi… 0.95 #> 3 ARM AGE effectsi… conf.low CI Lower… -0.144 #> 4 ARM AGE effectsi… conf.high CI Upper… 0.28 #> 5 ARM AGE effectsi… mu H0 Mean 0 #> 6 ARM AGE effectsi… paired Paired t… TRUE #> 7 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 8 ARM AGE effectsi… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_emmeans_mean_difference.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD for LS Mean Difference — ard_emmeans_mean_difference","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"function calculates least-squares mean differences using 'emmeans' package using following arguments data, formula, method, method.args, package used construct regression model via cardx::construct_model().","code":"emmeans::emmeans(object = , specs = ~ ) |> emmeans::contrast(method = \"pairwise\") |> summary(infer = TRUE, level = )"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_emmeans_mean_difference.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"","code":"ard_emmeans_mean_difference( data, formula, method, method.args = list(), package = \"base\", response_type = c(\"continuous\", \"dichotomous\"), conf.level = 0.95, primary_covariate = getElement(attr(stats::terms(formula), \"term.labels\"), 1L) )"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_emmeans_mean_difference.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"data (data.frame/survey.design) data frame survey design object formula (formula) formula method (string) string naming function called, e.g. \"glm\". function belongs library attached, package name must specified package argument. method.args (named list) named list arguments passed fn. package (string) string package name temporarily loaded function specified method executed. response_type (string) string indicating whether model outcome 'continuous' 'dichotomous'. 'dichotomous', call emmeans::emmeans() supplemented argument regrid=\"response\". conf.level (scalar numeric) confidence level confidence interval. Default 0.95. primary_covariate (string) string indicating primary covariate (typically dichotomous treatment variable). Default first covariate listed formula.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_emmeans_mean_difference.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_emmeans_mean_difference.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"","code":"ard_emmeans_mean_difference( data = mtcars, formula = mpg ~ am + cyl, method = \"lm\" ) #> {cards} data frame: 8 x 10 #> group1 variable variable_level stat_name stat_label stat #> 1 am contrast am0 - am1 estimate Mean Dif… -2.567 #> 2 am contrast am0 - am1 std.error std.error 1.291 #> 3 am contrast am0 - am1 df df 29 #> 4 am contrast am0 - am1 conf.low CI Lower… -5.208 #> 5 am contrast am0 - am1 conf.high CI Upper… 0.074 #> 6 am contrast am0 - am1 p.value p-value 0.056 #> 7 am contrast am0 - am1 conf.level CI Confi… 0.95 #> 8 am contrast am0 - am1 method method Least-sq… #> ℹ 4 more variables: context, fmt_fn, warning, error ard_emmeans_mean_difference( data = mtcars, formula = vs ~ am + mpg, method = \"glm\", method.args = list(family = binomial), response_type = \"dichotomous\" ) #> {cards} data frame: 8 x 10 #> group1 variable variable_level stat_name stat_label stat #> 1 am contrast am0 - am1 estimate Mean Dif… 0.61 #> 2 am contrast am0 - am1 std.error std.error 0.229 #> 3 am contrast am0 - am1 df df Inf #> 4 am contrast am0 - am1 conf.low CI Lower… 0.162 #> 5 am contrast am0 - am1 conf.high CI Upper… 1.059 #> 6 am contrast am0 - am1 p.value p-value 0.008 #> 7 am contrast am0 - am1 conf.level CI Confi… 0.95 #> 8 am contrast am0 - am1 method method Least-sq… #> ℹ 4 more variables: context, fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_proportion_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Proportion Confidence Intervals — ard_proportion_ci","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"Calculate confidence intervals proportions.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_proportion_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"","code":"ard_proportion_ci( data, variables, by = dplyr::group_vars(data), conf.level = 0.95, strata, weights = NULL, max.iterations = 10, method = c(\"waldcc\", \"wald\", \"clopper-pearson\", \"wilson\", \"wilsoncc\", \"strat_wilson\", \"strat_wilsoncc\", \"agresti-coull\", \"jeffreys\") )"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_proportion_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"data (data.frame) data frame variables (tidy-select) columns include summaries. Columns must class values coded c(0, 1). (tidy-select) columns stratify calculations conf.level (numeric) scalar (0, 1) indicating confidence level. Default 0.95 strata, weights, max.iterations arguments passed proportion_ci_strat_wilson(), method='strat_wilson' method (string) string indicating type confidence interval calculate. Must one 'waldcc', 'wald', 'clopper-pearson', 'wilson', 'wilsoncc', 'strat_wilson', 'strat_wilsoncc', 'agresti-coull', 'jeffreys'. See ?proportion_ci details.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_proportion_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_proportion_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"","code":"ard_proportion_ci(mtcars, variables = c(vs, am), method = \"wilson\") #> {cards} data frame: 20 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 vs proporti… N N 32 0 #> 2 vs proporti… conf.level conf.lev… 0.95 1 #> 3 vs proporti… estimate estimate 0.438 1 #> 4 vs proporti… statistic statistic 0.5 1 #> 5 vs proporti… p.value p.value 0.48 1 #> 6 vs proporti… parameter parameter 1 0 #> 7 vs proporti… conf.low conf.low 0.282 1 #> 8 vs proporti… conf.high conf.high 0.607 1 #> 9 vs proporti… method method Wilson C… #> 10 vs proporti… alternative alternat… two.sided #> 11 am proporti… N N 32 0 #> 12 am proporti… conf.level conf.lev… 0.95 1 #> 13 am proporti… estimate estimate 0.406 1 #> 14 am proporti… statistic statistic 1.125 1 #> 15 am proporti… p.value p.value 0.289 1 #> 16 am proporti… parameter parameter 1 0 #> 17 am proporti… conf.low conf.low 0.255 1 #> 18 am proporti… conf.high conf.high 0.577 1 #> 19 am proporti… method method Wilson C… #> 20 am proporti… alternative alternat… two.sided #> ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression.html","id":null,"dir":"Reference","previous_headings":"","what":"Regression ARD — ard_regression","title":"Regression ARD — ard_regression","text":"Function takes regression model object converts ARD structure using broom.helpers package.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regression ARD — ard_regression","text":"","code":"ard_regression(x, ...) # S3 method for default ard_regression(x, tidy_fun = broom.helpers::tidy_with_broom_or_parameters, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regression ARD — ard_regression","text":"x regression model object ... Arguments passed broom.helpers::tidy_plus_plus() tidy_fun (function) tidier. Default broom.helpers::tidy_with_broom_or_parameters","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Regression ARD — ard_regression","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Regression ARD — ard_regression","text":"","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_regression(add_estimate_to_reference_rows = TRUE) #> {cards} data frame: 43 x 7 #> variable variable_level context stat_name stat_label stat #> 1 ARM Placebo regressi… term term ARMPlace… #> 2 ARM Placebo regressi… var_label Label Descript… #> 3 ARM Placebo regressi… var_class Class character #> 4 ARM Placebo regressi… var_type Type categori… #> 5 ARM Placebo regressi… var_nlevels N Levels 3 #> 6 ARM Placebo regressi… contrasts contrasts contr.tr… #> 7 ARM Placebo regressi… contrasts_type Contrast… treatment #> 8 ARM Placebo regressi… reference_row referenc… TRUE #> 9 ARM Placebo regressi… label Level La… Placebo #> 10 ARM Placebo regressi… n_obs N Obs. 86 #> ℹ 33 more rows #> ℹ Use `print(n = ...)` to see more rows #> ℹ 1 more variable: fmt_fn"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression_basic.html","id":null,"dir":"Reference","previous_headings":"","what":"Basic Regression ARD — ard_regression_basic","title":"Basic Regression ARD — ard_regression_basic","text":"function takes regression model provides basic statistics ARD structure. default output simpler ard_regression(). function primarily matches regression terms underlying variable names levels. default arguments used ","code":"broom.helpers::tidy_plus_plus( add_reference_rows = FALSE, add_estimate_to_reference_rows = FALSE, add_n = FALSE, intercept = FALSE )"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression_basic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Basic Regression ARD — ard_regression_basic","text":"","code":"ard_regression_basic( x, tidy_fun = broom.helpers::tidy_with_broom_or_parameters, stats_to_remove = c(\"term\", \"var_type\", \"var_label\", \"var_class\", \"label\", \"contrasts_type\", \"contrasts\", \"var_nlevels\"), ... )"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression_basic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Basic Regression ARD — ard_regression_basic","text":"x regression model object tidy_fun (function) tidier. Default broom.helpers::tidy_with_broom_or_parameters stats_to_remove (character) character vector statistic names remove. Default c(\"term\", \"var_type\", \"var_label\", \"var_class\", \"label\", \"contrasts_type\", \"contrasts\", \"var_nlevels\"). ... Arguments passed broom.helpers::tidy_plus_plus()","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression_basic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Basic Regression ARD — ard_regression_basic","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_regression_basic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Basic Regression ARD — ard_regression_basic","text":"","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_regression_basic() #> {cards} data frame: 12 x 7 #> variable variable_level context stat_name stat_label stat #> 1 ARM Xanomeli… regressi… estimate Coeffici… -0.828 #> 2 ARM Xanomeli… regressi… std.error Standard… 1.267 #> 3 ARM Xanomeli… regressi… statistic statistic -0.654 #> 4 ARM Xanomeli… regressi… p.value p-value 0.514 #> 5 ARM Xanomeli… regressi… conf.low CI Lower… -3.324 #> 6 ARM Xanomeli… regressi… conf.high CI Upper… 1.668 #> 7 ARM Xanomeli… regressi… estimate Coeffici… 0.457 #> 8 ARM Xanomeli… regressi… std.error Standard… 1.267 #> 9 ARM Xanomeli… regressi… statistic statistic 0.361 #> 10 ARM Xanomeli… regressi… p.value p-value 0.719 #> 11 ARM Xanomeli… regressi… conf.low CI Lower… -2.039 #> 12 ARM Xanomeli… regressi… conf.high CI Upper… 2.953 #> ℹ 1 more variable: fmt_fn"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_smd_smd.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Standardized Mean Difference — ard_smd_smd","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"Standardized mean difference calculated via smd::smd() na.rm = TRUE.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_smd_smd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"","code":"ard_smd_smd(data, by, variables, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_smd_smd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"data (data.frame/survey.design) data frame object class 'survey.design' (typically created survey::svydesign()). (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable. ... Arguments passed smd::smd std.error Logical indicator computing standard errors using compute_smd_var. Defaults FALSE. gref integer indicating level g use reference group. Defaults 1.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_smd_smd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_smd_smd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"","code":"ard_smd_smd(cards::ADSL, by = ARM, variables = AGE, std.error = TRUE) #> {cards} data frame: 3 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE smd_smd estimate Standard… 0.101, -0.055 #> 2 ARM AGE smd_smd std.error Standard… 0.154, 0.153 #> 3 ARM AGE smd_smd gref Integer … 1 #> ℹ 3 more variables: fmt_fn, warning, error ard_smd_smd(cards::ADSL, by = ARM, variables = AGEGR1, std.error = TRUE) #> {cards} data frame: 3 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGEGR1 smd_smd estimate Standard… 0.351, 0.214 #> 2 ARM AGEGR1 smd_smd std.error Standard… 0.155, 0.154 #> 3 ARM AGEGR1 smd_smd gref Integer … 1 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_anova.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD ANOVA — ard_stats_anova","title":"ARD ANOVA — ard_stats_anova","text":"Prepare ANOVA results stats::anova() function. Users may pass pre-calculated stats::anova() object list formulas. latter case, models constructed using information passed models passed stats::anova().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD ANOVA — ard_stats_anova","text":"","code":"ard_stats_anova(x, ...) # S3 method for anova ard_stats_anova(x, method_text = \"ANOVA results from `stats::anova()`\", ...) # S3 method for data.frame ard_stats_anova( x, formulas, method, method.args = list(), package = \"base\", method_text = \"ANOVA results from `stats::anova()`\", ... )"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD ANOVA — ard_stats_anova","text":"x (anova data.frame) object class 'anova' created stats::anova() data frame ... dots future extensions must empty. method_text (string) string method used. Default \"ANOVA results stats::anova()\". provide option change stats::anova() can produce results many types models may warrant precise description. formulas (list) list formulas method (string) string naming function called, e.g. \"glm\". function belongs library attached, package name must specified package argument. method.args (named list) named list arguments passed fn. package (string) string package name temporarily loaded function specified method executed.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD ANOVA — ard_stats_anova","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_anova.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD ANOVA — ard_stats_anova","text":"list formulas supplied ard_stats_anova(), formulas along information arguments, used construct models pass models stats::anova(). models constructed using rlang::exec(), similar .call(). function executed withr::with_namespace(package), allows use ard_stats_anova(method) packages, e.g. package = 'lme4' must specified method = 'glmer'. See example .","code":"rlang::exec(.fn = method, formula = formula, data = data, !!!method.args)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_anova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD ANOVA — ard_stats_anova","text":"","code":"anova( lm(mpg ~ am, mtcars), lm(mpg ~ am + hp, mtcars) ) |> ard_stats_anova() #> {cards} data frame: 11 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 model_1 stats_an… term term mpg ~ am NULL #> 2 model_1 stats_an… df.residual df for r… 30 1 #> 3 model_1 stats_an… rss Residual… 720.897 1 #> 4 model_2 stats_an… term term mpg ~ am… NULL #> 5 model_2 stats_an… df.residual df for r… 29 1 #> 6 model_2 stats_an… rss Residual… 245.439 1 #> 7 model_2 stats_an… df Degrees … 1 1 #> 8 model_2 stats_an… sumsq Sum of S… 475.457 1 #> 9 model_2 stats_an… statistic statistic 56.178 1 #> 10 model_2 stats_an… p.value p-value 0 1 #> 11 model_2 stats_an… method method ANOVA re… NULL #> ℹ 2 more variables: warning, error ard_stats_anova( x = mtcars, formulas = list(am ~ mpg, am ~ mpg + hp), method = \"glm\", method.args = list(family = binomial) ) #> {cards} data frame: 9 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 model_1 stats_an… term term am ~ mpg NULL #> 2 model_1 stats_an… df.residual df for r… 30 1 #> 3 model_1 stats_an… residual.deviance residual… 29.675 1 #> 4 model_2 stats_an… term term am ~ mpg… NULL #> 5 model_2 stats_an… df.residual df for r… 29 1 #> 6 model_2 stats_an… residual.deviance residual… 19.233 1 #> 7 model_2 stats_an… df Degrees … 1 1 #> 8 model_2 stats_an… deviance deviance 10.443 1 #> 9 model_2 stats_an… method method ANOVA re… NULL #> ℹ 2 more variables: warning, error ard_stats_anova( x = mtcars, formulas = list(am ~ 1 + (1 | vs), am ~ mpg + (1 | vs)), method = \"glmer\", method.args = list(family = binomial), package = \"lme4\" ) #> {cards} data frame: 16 x 8 #> variable context stat_name stat_label stat warning #> 1 model_1 stats_an… term term MODEL1 failed t… #> 2 model_1 stats_an… npar npar 2 failed t… #> 3 model_1 stats_an… AIC AIC 47.23 failed t… #> 4 model_1 stats_an… BIC BIC 50.161 failed t… #> 5 model_1 stats_an… logLik logLik -21.615 failed t… #> 6 model_1 stats_an… deviance deviance 43.23 failed t… #> 7 model_2 stats_an… term term MODEL2 failed t… #> 8 model_2 stats_an… npar npar 3 failed t… #> 9 model_2 stats_an… AIC AIC 35.25 failed t… #> 10 model_2 stats_an… BIC BIC 39.647 failed t… #> 11 model_2 stats_an… logLik logLik -14.625 failed t… #> 12 model_2 stats_an… deviance deviance 29.25 failed t… #> 13 model_2 stats_an… statistic statistic 13.979 failed t… #> 14 model_2 stats_an… df Degrees … 1 failed t… #> 15 model_2 stats_an… p.value p-value 0 failed t… #> 16 model_2 stats_an… method method ANOVA re… failed t… #> ℹ 2 more variables: fmt_fn, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_aov.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD ANOVA — ard_stats_aov","title":"ARD ANOVA — ard_stats_aov","text":"Analysis results data Analysis Variance. Calculated stats::aov()","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_aov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD ANOVA — ard_stats_aov","text":"","code":"ard_stats_aov(formula, data, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_aov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD ANOVA — ard_stats_aov","text":"formula formula specifying model. data data frame variables specified formula found. missing, variables searched standard way. ... arguments passed stats::aov(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_aov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD ANOVA — ard_stats_aov","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_aov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD ANOVA — ard_stats_aov","text":"","code":"ard_stats_aov(AGE ~ ARM, data = cards::ADSL) #> {cards} data frame: 5 x 7 #> variable context stat_name stat_label stat error #> 1 ARM stats_aov sumsq Sum of S… 71.386 #> 2 ARM stats_aov df Degrees … 2 #> 3 ARM stats_aov meansq Mean of … 35.693 #> 4 ARM stats_aov statistic Statistic 0.523 #> 5 ARM stats_aov p.value p-value 0.593 #> ℹ 1 more variable: warning"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_chisq_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Chi-squared Test — ard_stats_chisq_test","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"Analysis results data Pearson's Chi-squared Test. Calculated chisq.test(x = data[[variable]], y = data[[]], ...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_chisq_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"","code":"ard_stats_chisq_test(data, by, variables, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_chisq_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"data (data.frame) data frame. (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable. ... additional arguments passed chisq.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_chisq_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_chisq_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"","code":"cards::ADSL |> ard_stats_chisq_test(by = \"ARM\", variables = \"AGEGR1\") #> {cards} data frame: 9 x 9 #> group1 variable context stat_name stat_label #> 1 ARM AGEGR1 stats_ch… statistic X-square… #> 2 ARM AGEGR1 stats_ch… p.value p-value #> 3 ARM AGEGR1 stats_ch… parameter Degrees … #> 4 ARM AGEGR1 stats_ch… method method #> 5 ARM AGEGR1 stats_ch… correct correct #> 6 ARM AGEGR1 stats_ch… p p #> 7 ARM AGEGR1 stats_ch… rescale.p rescale.p #> 8 ARM AGEGR1 stats_ch… simulate.p.value simulate… #> 9 ARM AGEGR1 stats_ch… B B #> stat #> 1 6.852 #> 2 0.144 #> 3 4 #> 4 Pearson'… #> 5 TRUE #> 6 rep, 1/length(x), length(x) #> 7 FALSE #> 8 FALSE #> 9 2000 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_fisher_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Fisher's Exact Test — ard_stats_fisher_test","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"Analysis results data Fisher's Exact Test. Calculated fisher.test(x = data[[variable]], y = data[[]], ...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_fisher_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"","code":"ard_stats_fisher_test(data, by, variables, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_fisher_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"data (data.frame) data frame. (tidy-select) column name compare variables (tidy-select) column names compared. Independent tests computed variable. conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... additional arguments passed fisher.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_fisher_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_fisher_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"","code":"cards::ADSL[1:30, ] |> ard_stats_fisher_test(by = \"ARM\", variables = \"AGEGR1\") #> {cards} data frame: 12 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGEGR1 stats_fi… p.value p-value 0.089 #> 2 ARM AGEGR1 stats_fi… method method Fisher's… #> 3 ARM AGEGR1 stats_fi… alternative alternat… two.sided #> 4 ARM AGEGR1 stats_fi… workspace workspace 2e+05 #> 5 ARM AGEGR1 stats_fi… hybrid hybrid FALSE #> 6 ARM AGEGR1 stats_fi… hybridPars hybridPa… c, 5, 80, 1 #> 7 ARM AGEGR1 stats_fi… control control list #> 8 ARM AGEGR1 stats_fi… or or 1 #> 9 ARM AGEGR1 stats_fi… conf.int conf.int TRUE #> 10 ARM AGEGR1 stats_fi… conf.level conf.lev… 0.95 #> 11 ARM AGEGR1 stats_fi… simulate.p.value simulate… FALSE #> 12 ARM AGEGR1 stats_fi… B B 2000 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_kruskal_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"Analysis results data Kruskal-Wallis Rank Sum Test. Calculated kruskal.test(data[[variable]], data[[]], ...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_kruskal_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"","code":"ard_stats_kruskal_test(data, by, variables)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_kruskal_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"data (data.frame) data frame. (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_kruskal_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_kruskal_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"","code":"cards::ADSL |> ard_stats_kruskal_test(by = \"ARM\", variables = \"AGE\") #> {cards} data frame: 4 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_kr… statistic Kruskal-… 1.635 #> 2 ARM AGE stats_kr… p.value p-value 0.442 #> 3 ARM AGE stats_kr… parameter Degrees … 2 #> 4 ARM AGE stats_kr… method method Kruskal-… #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mcnemar_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD McNemar's Test — ard_stats_mcnemar_test","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"Analysis results data McNemar's statistical test. two functions depending structure data. ard_stats_mcnemar_test() structure expected stats::mcnemar.test() ard_stats_mcnemar_test_long() one row per ID per group","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mcnemar_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"","code":"ard_stats_mcnemar_test(data, by, variables, ...) ard_stats_mcnemar_test_long(data, by, variables, id, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mcnemar_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"data (data.frame) data frame. See details. (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable. ... arguments passed stats::mcnemar.test(...) id (tidy-select) column name subject participant ID","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mcnemar_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mcnemar_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"ard_stats_mcnemar_test() function, data expected one row per subject. data passed stats::mcnemar.test(x = data[[variable]], y = data[[]], ...). Please use table(x = data[[variable]], y = data[[]]) check contingency table.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mcnemar_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"","code":"cards::ADSL |> ard_stats_mcnemar_test(by = \"SEX\", variables = \"EFFFL\") #> {cards} data frame: 5 x 9 #> group1 variable context stat_name stat_label stat #> 1 SEX EFFFL stats_mc… statistic X-square… 111.91 #> 2 SEX EFFFL stats_mc… p.value p-value 0 #> 3 SEX EFFFL stats_mc… parameter Degrees … 1 #> 4 SEX EFFFL stats_mc… method method McNemar'… #> 5 SEX EFFFL stats_mc… correct correct TRUE #> ℹ 3 more variables: fmt_fn, warning, error set.seed(1234) cards::ADSL[c(\"USUBJID\", \"TRT01P\")] |> dplyr::mutate(TYPE = \"PLANNED\") |> dplyr::rename(TRT01 = TRT01P) %>% dplyr::bind_rows(dplyr::mutate(., TYPE = \"ACTUAL\", TRT01 = sample(TRT01))) |> ard_stats_mcnemar_test_long( by = TYPE, variable = TRT01, id = USUBJID ) #> {cards} data frame: 5 x 9 #> group1 variable context stat_name stat_label stat #> 1 TYPE TRT01 stats_mc… statistic X-square… 1.353 #> 2 TYPE TRT01 stats_mc… p.value p-value 0.717 #> 3 TYPE TRT01 stats_mc… parameter Degrees … 3 #> 4 TYPE TRT01 stats_mc… method method McNemar'… #> 5 TYPE TRT01 stats_mc… correct correct TRUE #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mood_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Mood Test — ard_stats_mood_test","title":"ARD Mood Test — ard_stats_mood_test","text":"Analysis results data Mood two sample test scale. Note confused Brown-Mood test medians.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mood_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Mood Test — ard_stats_mood_test","text":"","code":"ard_stats_mood_test(data, by, variables, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mood_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Mood Test — ard_stats_mood_test","text":"data (data.frame) data frame. See details. (tidy-select) column name compare . variables (tidy-select) column name compared. Independent tests run variable. ... arguments passed mood.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mood_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Mood Test — ard_stats_mood_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mood_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Mood Test — ard_stats_mood_test","text":"ard_stats_mood_test() function, data expected one row per subject. data passed mood.test(data[[variable]] ~ data[[]], ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_mood_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Mood Test — ard_stats_mood_test","text":"","code":"cards::ADSL |> ard_stats_mood_test(by = \"SEX\", variables = \"AGE\") #> {cards} data frame: 4 x 9 #> group1 variable context stat_name stat_label stat #> 1 SEX AGE stats_mo… statistic Z-Statis… 0.129 #> 2 SEX AGE stats_mo… p.value p-value 0.897 #> 3 SEX AGE stats_mo… method method Mood two… #> 4 SEX AGE stats_mo… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_oneway_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD One-way Test — ard_stats_oneway_test","title":"ARD One-way Test — ard_stats_oneway_test","text":"Analysis results data Testing Equal Means One-Way Layout. calculated oneway.test()","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_oneway_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD One-way Test — ard_stats_oneway_test","text":"","code":"ard_stats_oneway_test(formula, data, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_oneway_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD One-way Test — ard_stats_oneway_test","text":"formula formula form lhs ~ rhs lhs gives sample values rhs corresponding groups. data optional matrix data frame (similar: see model.frame) containing variables formula formula. default variables taken environment(formula). ... additional arguments passed oneway.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_oneway_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD One-way Test — ard_stats_oneway_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_oneway_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD One-way Test — ard_stats_oneway_test","text":"","code":"ard_stats_oneway_test(AGE ~ ARM, data = cards::ADSL) #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_on… num.df Degrees … 2 #> 2 ARM AGE stats_on… den.df Denomina… 167.237 #> 3 ARM AGE stats_on… statistic F Statis… 0.547 #> 4 ARM AGE stats_on… p.value p-value 0.58 #> 5 ARM AGE stats_on… method Method One-way … #> 6 ARM AGE stats_on… var.equal var.equal FALSE #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_prop_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD 2-sample proportion test — ard_stats_prop_test","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"Analysis results data 2-sample test proportions using stats::prop.test().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_prop_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"","code":"ard_stats_prop_test(data, by, variables, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_prop_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"data (data.frame) data frame. (tidy-select) column name compare variables (tidy-select) column names compared. Must binary column coded TRUE/FALSE 1/0. Independent tests computed variable. conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed prop.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_prop_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_prop_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"","code":"mtcars |> ard_stats_prop_test(by = vs, variables = am) #> {cards} data frame: 13 x 9 #> group1 variable context stat_name stat_label stat #> 1 vs am stats_pr… estimate Rate Dif… -0.167 #> 2 vs am stats_pr… estimate1 Group 1 … 0.333 #> 3 vs am stats_pr… estimate2 Group 2 … 0.5 #> 4 vs am stats_pr… statistic X-square… 0.348 #> 5 vs am stats_pr… p.value p-value 0.556 #> 6 vs am stats_pr… parameter Degrees … 1 #> 7 vs am stats_pr… conf.low CI Lower… -0.571 #> 8 vs am stats_pr… conf.high CI Upper… 0.237 #> 9 vs am stats_pr… method method 2-sample… #> 10 vs am stats_pr… alternative alternat… two.sided #> 11 vs am stats_pr… p p #> 12 vs am stats_pr… conf.level CI Confi… 0.95 #> 13 vs am stats_pr… correct Yates' c… TRUE #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_t_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD t-test — ard_stats_t_test","title":"ARD t-test — ard_stats_t_test","text":"Analysis results data paired non-paired t-tests.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_t_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD t-test — ard_stats_t_test","text":"","code":"ard_stats_t_test(data, variables, by = NULL, conf.level = 0.95, ...) ard_stats_paired_t_test(data, by, variables, id, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_t_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD t-test — ard_stats_t_test","text":"data (data.frame) data frame. See details. variables (tidy-select) column names compared. Independent t-tests computed variable. (tidy-select) optional column name compare . conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed t.test(...) id (tidy-select) column name subject participant ID","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_t_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD t-test — ard_stats_t_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_t_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD t-test — ard_stats_t_test","text":"ard_stats_t_test() function, data expected one row per subject. data passed t.test(data[[variable]] ~ data[[]], paired = FALSE, ...). ard_stats_paired_t_test() function, data expected one row per subject per level. t-test calculated, data reshaped wide format one row per subject. data passed t.test(x = data_wide[[]], y = data_wide[[]], paired = TRUE, ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_t_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD t-test — ard_stats_t_test","text":"","code":"cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_stats_t_test(by = ARM, variables = c(AGE, BMIBL)) #> {cards} data frame: 28 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_t_… estimate Mean Dif… 0.828 #> 2 ARM AGE stats_t_… estimate1 Group 1 … 75.209 #> 3 ARM AGE stats_t_… estimate2 Group 2 … 74.381 #> 4 ARM AGE stats_t_… statistic t Statis… 0.655 #> 5 ARM AGE stats_t_… p.value p-value 0.513 #> 6 ARM AGE stats_t_… parameter Degrees … 167.362 #> 7 ARM AGE stats_t_… conf.low CI Lower… -1.668 #> 8 ARM AGE stats_t_… conf.high CI Upper… 3.324 #> 9 ARM AGE stats_t_… method method Welch Tw… #> 10 ARM AGE stats_t_… alternative alternat… two.sided #> ℹ 18 more rows #> ℹ Use `print(n = ...)` to see more rows #> ℹ 3 more variables: fmt_fn, warning, error # constructing a paired data set, # where patients receive both treatments cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> ard_stats_paired_t_test(by = ARM, variables = AGE, id = USUBJID) #> {cards} data frame: 12 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_t_… estimate Mean Dif… 0.798 #> 2 ARM AGE stats_t_… statistic t Statis… 0.628 #> 3 ARM AGE stats_t_… p.value p-value 0.531 #> 4 ARM AGE stats_t_… parameter Degrees … 83 #> 5 ARM AGE stats_t_… conf.low CI Lower… -1.727 #> 6 ARM AGE stats_t_… conf.high CI Upper… 3.322 #> 7 ARM AGE stats_t_… method method Paired t… #> 8 ARM AGE stats_t_… alternative alternat… two.sided #> 9 ARM AGE stats_t_… mu H0 Mean 0 #> 10 ARM AGE stats_t_… paired Paired t… TRUE #> 11 ARM AGE stats_t_… var.equal Equal Va… FALSE #> 12 ARM AGE stats_t_… conf.level CI Confi… 0.95 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_wilcox_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"Analysis results data paired non-paired Wilcoxon Rank-Sum tests.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_wilcox_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"","code":"ard_stats_wilcox_test(data, variables, by = NULL, conf.level = 0.95, ...) ard_stats_paired_wilcox_test(data, by, variables, id, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_wilcox_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"data (data.frame) data frame. See details. variables (tidy-select) column names compared. Independent tests computed variable. (tidy-select) optional column name compare . conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed wilcox.test(...) id (tidy-select) column name subject participant ID.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_wilcox_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_wilcox_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"ard_stats_wilcox_test() function, data expected one row per subject. data passed wilcox.test(data[[variable]] ~ data[[]], paired = FALSE, ...). ard_stats_paired_wilcox_test() function, data expected one row per subject per level. test calculated, data reshaped wide format one row per subject. data passed wilcox.test(x = data_wide[[]], y = data_wide[[]], paired = TRUE, ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_stats_wilcox_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"","code":"cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_stats_wilcox_test(by = \"ARM\", variables = \"AGE\") #> {cards} data frame: 12 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_wi… statistic X-square… 3862.5 #> 2 ARM AGE stats_wi… p.value p-value 0.435 #> 3 ARM AGE stats_wi… method method Wilcoxon… #> 4 ARM AGE stats_wi… alternative alternat… two.sided #> 5 ARM AGE stats_wi… mu mu 0 #> 6 ARM AGE stats_wi… paired Paired t… FALSE #> 7 ARM AGE stats_wi… exact exact #> 8 ARM AGE stats_wi… correct correct TRUE #> 9 ARM AGE stats_wi… conf.int conf.int FALSE #> 10 ARM AGE stats_wi… conf.level CI Confi… 0.95 #> 11 ARM AGE stats_wi… tol.root tol.root 0 #> 12 ARM AGE stats_wi… digits.rank digits.r… Inf #> ℹ 3 more variables: fmt_fn, warning, error # constructing a paired data set, # where patients receive both treatments cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> ard_stats_paired_wilcox_test(by = ARM, variables = AGE, id = USUBJID) #> {cards} data frame: 12 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_wi… statistic X-square… 1754 #> 2 ARM AGE stats_wi… p.value p-value 0.522 #> 3 ARM AGE stats_wi… method method Wilcoxon… #> 4 ARM AGE stats_wi… alternative alternat… two.sided #> 5 ARM AGE stats_wi… mu mu 0 #> 6 ARM AGE stats_wi… paired Paired t… TRUE #> 7 ARM AGE stats_wi… exact exact #> 8 ARM AGE stats_wi… correct correct TRUE #> 9 ARM AGE stats_wi… conf.int conf.int FALSE #> 10 ARM AGE stats_wi… conf.level CI Confi… 0.95 #> 11 ARM AGE stats_wi… tol.root tol.root 0 #> 12 ARM AGE stats_wi… digits.rank digits.r… Inf #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svychisq.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Survey Chi-Square Test — ard_survey_svychisq","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"Analysis results data survey Chi-Square test using survey::svychisq(). two-way comparisons supported.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svychisq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"","code":"ard_survey_svychisq(data, by, variables, statistic = \"F\", ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svychisq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"data (survey.design) survey design object often created {survey} package (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable. statistic (character) statistic used estimate Chisq p-value. Default Rao-Scott second-order correction (\"F\"). See survey::svychisq available statistics options. ... arguments passed survey::svychisq().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svychisq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svychisq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"","code":"data(api, package = \"survey\") dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) ard_survey_svychisq(dclus1, variables = sch.wide, by = comp.imp, statistic = \"F\") #> {cards} data frame: 5 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp sch.wide survey_s… ndf Nominato… 1 #> 2 comp.imp sch.wide survey_s… ddf Denomina… 14 #> 3 comp.imp sch.wide survey_s… statistic Statistic 236.895 #> 4 comp.imp sch.wide survey_s… p.value p-value 0 #> 5 comp.imp sch.wide survey_s… method method Pearson'… #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svycontinuous.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"Returns ARD weighted statistics using {survey} package.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svycontinuous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"","code":"ard_survey_svycontinuous( data, variables, by = NULL, statistic = everything() ~ c(\"median\", \"p25\", \"p75\"), fmt_fn = NULL, stat_label = NULL )"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svycontinuous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"data (survey.design) design object often created survey::svydesign(). variables (tidy-select) columns include summaries. Default everything(). (tidy-select) results calculated combinations columns specified, including unobserved combinations unobserved factor levels. statistic (formula-list-selector) named list, list formulas, single formula list element character vector statistic names include. See options. fmt_fn (formula-list-selector) named list, list formulas, single formula list element named list functions (RHS formula), e.g. list(mpg = list(mean = \\(x) round(x, digits = 2) |> .character)). stat_label (formula-list-selector) named list, list formulas, single formula list element either named list list formulas defining statistic labels, e.g. everything() ~ list(mean = \"Mean\", sd = \"SD\") everything() ~ list(mean ~ \"Mean\", sd ~ \"SD\").","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svycontinuous.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svycontinuous.html","id":"statistic-argument","dir":"Reference","previous_headings":"","what":"statistic argument","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"following statistics available: 'mean', 'median', 'min', 'max', 'sum', 'var', 'sd', 'mean.std.error', 'deff', 'p##', 'p##' percentiles ## integer 0 100.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svycontinuous.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"","code":"data(api, package = \"survey\") dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) ard_survey_svycontinuous( data = dclus1, variables = api00, by = stype ) #> {cards} data frame: 9 x 10 #> group1 group1_level variable stat_name stat_label stat #> 1 stype E api00 median Median 652 #> 2 stype H api00 median Median 608 #> 3 stype M api00 median Median 642 #> 4 stype E api00 p25 25% Perc… 553 #> 5 stype H api00 p25 25% Perc… 529 #> 6 stype M api00 p25 25% Perc… 547 #> 7 stype E api00 p75 75% Perc… 729 #> 8 stype H api00 p75 75% Perc… 703 #> 9 stype M api00 p75 75% Perc… 699 #> ℹ 4 more variables: context, fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyranktest.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Survey rank test — ard_survey_svyranktest","title":"ARD Survey rank test — ard_survey_svyranktest","text":"Analysis results data survey wilcox test using survey::svyranktest().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyranktest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Survey rank test — ard_survey_svyranktest","text":"","code":"ard_survey_svyranktest(data, by, variables, test, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyranktest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Survey rank test — ard_survey_svyranktest","text":"data (survey.design) survey design object often created survey::svydesign() (tidy-select) column name compare variables (tidy-select) column names compared. Independent tests run variable. test (string) string denote rank test use: \"wilcoxon\", \"vanderWaerden\", \"median\", \"KruskalWallis\" ... arguments passed survey::svyranktest()","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyranktest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Survey rank test — ard_survey_svyranktest","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyranktest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Survey rank test — ard_survey_svyranktest","text":"","code":"data(api, package = \"survey\") dclus2 <- survey::svydesign(id = ~ dnum + snum, fpc = ~ fpc1 + fpc2, data = apiclus2) ard_survey_svyranktest(dclus2, variables = enroll, by = comp.imp, test = \"wilcoxon\") #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Median o… -0.106 #> 2 comp.imp enroll survey_s… statistic Statistic -1.719 #> 3 comp.imp enroll survey_s… p.value p-value 0.094 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error ard_survey_svyranktest(dclus2, variables = enroll, by = comp.imp, test = \"vanderWaerden\") #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Median o… -0.379 #> 2 comp.imp enroll survey_s… statistic Statistic -1.584 #> 3 comp.imp enroll survey_s… p.value p-value 0.122 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error ard_survey_svyranktest(dclus2, variables = enroll, by = comp.imp, test = \"median\") #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Median o… -0.124 #> 2 comp.imp enroll survey_s… statistic Statistic -0.914 #> 3 comp.imp enroll survey_s… p.value p-value 0.367 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error ard_survey_svyranktest(dclus2, variables = enroll, by = comp.imp, test = \"KruskalWallis\") #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Median o… -0.106 #> 2 comp.imp enroll survey_s… statistic Statistic -1.719 #> 3 comp.imp enroll survey_s… p.value p-value 0.094 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyttest.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Survey t-test — ard_survey_svyttest","title":"ARD Survey t-test — ard_survey_svyttest","text":"Analysis results data survey t-test using survey::svyttest().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyttest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Survey t-test — ard_survey_svyttest","text":"","code":"ard_survey_svyttest(data, by, variables, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyttest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Survey t-test — ard_survey_svyttest","text":"data (survey.design) survey design object often created survey::svydesign() (tidy-select) column name compare variables (tidy-select) column names compared. Independent tests run variable. conf.level (double) confidence level returned confidence interval. Must c(0, 1). Default 0.95 ... arguments passed survey::svyttest()","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyttest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Survey t-test — ard_survey_svyttest","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survey_svyttest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Survey t-test — ard_survey_svyttest","text":"","code":"data(api, package = \"survey\") dclus2 <- survey::svydesign(id = ~ dnum + snum, fpc = ~ fpc1 + fpc2, data = apiclus2) ard_survey_svyttest(dclus2, variables = enroll, by = comp.imp, conf.level = 0.9) #> {cards} data frame: 9 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Mean -225.737 #> 2 comp.imp enroll survey_s… statistic t Statis… -2.888 #> 3 comp.imp enroll survey_s… p.value p-value 0.007 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative alternat… two.sided #> 7 comp.imp enroll survey_s… conf.low CI Lower… -357.69 #> 8 comp.imp enroll survey_s… conf.high CI Upper… -93.784 #> 9 comp.imp enroll survey_s… conf.level CI Confi… 0.9 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survdiff.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD for Difference in Survival — ard_survival_survdiff","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"Analysis results data comparison survival using survival::survdiff().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survdiff.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"","code":"ard_survival_survdiff(formula, data, rho = 0, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survdiff.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"formula (formula) formula data (data.frame) data frame rho (scalar numeric) numeric scalar passed survival::survdiff(rho). Default rho=0. ... additional arguments passed survival::survdiff()","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survdiff.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survdiff.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"","code":"library(survival) library(ggsurvfit) #> Loading required package: ggplot2 ard_survival_survdiff(Surv_CNSR(AVAL, CNSR) ~ TRTA, data = cards::ADTTE) #> {cards} data frame: 4 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 TRTA survival… statistic X^2 Stat… 60.27 1 #> 2 TRTA survival… df Degrees … 2 1 #> 3 TRTA survival… p.value p-value 0 1 #> 4 TRTA survival… method method Log-rank… NULL #> ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survfit.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Survival Estimates — ard_survival_survfit","title":"ARD Survival Estimates — ard_survival_survfit","text":"Analysis results data survival quantiles x-year survival estimates, extracted survival::survfit() model.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Survival Estimates — ard_survival_survfit","text":"","code":"ard_survival_survfit(x, times = NULL, probs = NULL, type = NULL)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Survival Estimates — ard_survival_survfit","text":"x (survival::survfit()) survival::survfit() object. See details. times (numeric) vector times return survival probabilities. probs (numeric) vector probabilities values (0,1) specifying survival quantiles return. type (string NULL) type statistic report. Available Kaplan-Meier time estimates , otherwise type ignored. Default NULL. Must one following:","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Survival Estimates — ard_survival_survfit","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Survival Estimates — ard_survival_survfit","text":"one either times probs parameters can specified. Times provided using scale time variable used fit provided survival fit model.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_survival_survfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Survival Estimates — ard_survival_survfit","text":"","code":"library(survival) library(ggsurvfit) survfit(Surv_CNSR(AVAL, CNSR) ~ TRTA, cards::ADTTE) |> ard_survival_survfit(times = c(60, 180)) #> {cards} data frame: 18 x 11 #> group1 group1_level variable variable_level stat_name stat_label stat #> 1 TRTA Placebo time 60 estimate Survival… 0.768 #> 2 TRTA Placebo time 60 conf.high CI Upper… 0.866 #> 3 TRTA Placebo time 60 conf.low CI Lower… 0.682 #> 4 TRTA Placebo time 180 estimate Survival… 0.626 #> 5 TRTA Placebo time 180 conf.high CI Upper… 0.746 #> 6 TRTA Placebo time 180 conf.low CI Lower… 0.526 #> 7 TRTA Xanomeli… time 60 estimate Survival… 0.243 #> 8 TRTA Xanomeli… time 60 conf.high CI Upper… 0.373 #> 9 TRTA Xanomeli… time 60 conf.low CI Lower… 0.158 #> 10 TRTA Xanomeli… time 180 estimate Survival… 0.092 #> 11 TRTA Xanomeli… time 180 conf.high CI Upper… 0.221 #> 12 TRTA Xanomeli… time 180 conf.low CI Lower… 0.038 #> 13 TRTA Xanomeli… time 60 estimate Survival… 0.311 #> 14 TRTA Xanomeli… time 60 conf.high CI Upper… 0.441 #> 15 TRTA Xanomeli… time 60 conf.low CI Lower… 0.219 #> 16 TRTA Xanomeli… time 180 estimate Survival… 0.126 #> 17 TRTA Xanomeli… time 180 conf.high CI Upper… 0.249 #> 18 TRTA Xanomeli… time 180 conf.low CI Lower… 0.064 #> ℹ 4 more variables: context, fmt_fn, warning, error survfit(Surv_CNSR(AVAL, CNSR) ~ TRTA, cards::ADTTE) |> ard_survival_survfit(probs = c(0.25, 0.5, 0.75)) #> {cards} data frame: 27 x 11 #> group1 group1_level variable variable_level stat_name stat_label stat #> 1 TRTA Placebo prob 0.25 estimate Survival… 70 #> 2 TRTA Placebo prob 0.25 conf.high CI Upper… 177 #> 3 TRTA Placebo prob 0.25 conf.low CI Lower… 35 #> 4 TRTA Placebo prob 0.5 estimate Survival… NA #> 5 TRTA Placebo prob 0.5 conf.high CI Upper… NA #> 6 TRTA Placebo prob 0.5 conf.low CI Lower… NA #> 7 TRTA Placebo prob 0.75 estimate Survival… NA #> 8 TRTA Placebo prob 0.75 conf.high CI Upper… NA #> 9 TRTA Placebo prob 0.75 conf.low CI Lower… NA #> 10 TRTA Xanomeli… prob 0.25 estimate Survival… 14 #> ℹ 17 more rows #> ℹ Use `print(n = ...)` to see more rows #> ℹ 4 more variables: context, fmt_fn, warning, error # Competing Risks Example --------------------------- set.seed(1) ADTTE_MS <- cards::ADTTE %>% dplyr::mutate( CNSR = dplyr::case_when( CNSR == 0 ~ \"censor\", runif(dplyr::n()) < 0.5 ~ \"death from cancer\", TRUE ~ \"death other causes\" ) %>% factor() ) survfit(Surv(AVAL, CNSR) ~ TRTA, data = ADTTE_MS) %>% ard_survival_survfit(times = c(60, 180)) #> Multi-state model detected. Showing probabilities into state 'death from #> cancer'. #> {cards} data frame: 18 x 11 #> group1 group1_level variable variable_level stat_name stat_label stat #> 1 TRTA Placebo time 60 estimate Survival… 0.054 #> 2 TRTA Placebo time 60 conf.high CI Upper… 0.14 #> 3 TRTA Placebo time 60 conf.low CI Lower… 0.021 #> 4 TRTA Placebo time 180 estimate Survival… 0.226 #> 5 TRTA Placebo time 180 conf.high CI Upper… 0.361 #> 6 TRTA Placebo time 180 conf.low CI Lower… 0.142 #> 7 TRTA Xanomeli… time 60 estimate Survival… 0.137 #> 8 TRTA Xanomeli… time 60 conf.high CI Upper… 0.311 #> 9 TRTA Xanomeli… time 60 conf.low CI Lower… 0.06 #> 10 TRTA Xanomeli… time 180 estimate Survival… 0.51 #> 11 TRTA Xanomeli… time 180 conf.high CI Upper… 0.892 #> 12 TRTA Xanomeli… time 180 conf.low CI Lower… 0.292 #> 13 TRTA Xanomeli… time 60 estimate Survival… 0.162 #> 14 TRTA Xanomeli… time 60 conf.high CI Upper… 0.33 #> 15 TRTA Xanomeli… time 60 conf.low CI Lower… 0.08 #> 16 TRTA Xanomeli… time 180 estimate Survival… 0.244 #> 17 TRTA Xanomeli… time 180 conf.high CI Upper… 0.516 #> 18 TRTA Xanomeli… time 180 conf.low CI Lower… 0.115 #> ℹ 4 more variables: context, fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/cardx-package.html","id":null,"dir":"Reference","previous_headings":"","what":"cardx: Extra Analysis Results Data Utilities — cardx-package","title":"cardx: Extra Analysis Results Data Utilities — cardx-package","text":"Create extra Analysis Results Data (ARD) summary objects. package supplements simple ARD functions 'cards' package, exporting functions put statistical results ARD format. objects used re-used construct summary tables, visualizations, written reports.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/reference/cardx-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"cardx: Extra Analysis Results Data Utilities — cardx-package","text":"Maintainer: Daniel Sjoberg danield.sjoberg@gmail.com Authors: Abinaya Yogasekaram abinaya.yogasekaram@contractors.roche.com Emily de la Rua emily.de_la_rua@contractors.roche.com contributors: F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/construction_helpers.html","id":null,"dir":"Reference","previous_headings":"","what":"Construction Helpers — construction_helpers","title":"Construction Helpers — construction_helpers","text":"functions help construct calls various types models.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/construction_helpers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construction Helpers — construction_helpers","text":"","code":"construct_model(x, ...) # S3 method for data.frame construct_model( x, formula, method, method.args = list(), package = \"base\", env = caller_env(), ... ) # S3 method for survey.design construct_model( x, formula, method, method.args = list(), package = \"survey\", env = caller_env(), ... ) reformulate2( termlabels, response = NULL, intercept = TRUE, pattern_term = \"[ \\n\\r]\", pattern_response = \"[ \\n\\r]\", env = parent.frame() ) bt(x, pattern = \"[ \\n\\r]\") bt_strip(x)"},{"path":"https://insightsengineering.github.io/cardx/reference/construction_helpers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construction Helpers — construction_helpers","text":"x construct_model.data.frame() (data.frame) data frame construct_model.survey.design() (survey.design) survey design object bt()/bt_strip() (character) character vector, typically variable names ... dots future extensions must empty. formula (formula) formula method (string) string naming function called, e.g. \"glm\". function belongs library attached, package name must specified package argument. method.args (named list) named list arguments passed fn. package (string) string package name temporarily loaded function specified method executed. env environment evaluate expr. environment applicable quosures environments. termlabels character vector giving right-hand side model formula. zero-length. response character string, symbol call giving left-hand side model formula, NULL. intercept logical: formula intercept? pattern_term, pattern_response passed bt(pattern) arguments stats::reformulate(termlabels, response). pattern (string) regular expression string. regex matches, backticks added string. NULL, backticks added.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/construction_helpers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construction Helpers — construction_helpers","text":"depends calling function","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/construction_helpers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Construction Helpers — construction_helpers","text":"construct_model(): Builds models form method(data = data, formula = formula, method.args!!!). package argument specified, package temporarily attached model evaluated. reformulate2(): copy reformulate() except variable names contain space wrapped backticks. bt(): Adds backticks character vector. bt_strip(): Removes backticks string begins ends backtick.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/construction_helpers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Construction Helpers — construction_helpers","text":"","code":"construct_model( x = mtcars, formula = am ~ mpg + (1 | vs), method = \"glmer\", method.args = list(family = binomial), package = \"lme4\" ) #> Generalized linear mixed model fit by maximum likelihood (Laplace #> Approximation) [glmerMod] #> Family: binomial ( logit ) #> Formula: am ~ mpg + (1 | vs) #> Data: structure(list(mpg = c(21, 21, 22.8, 21.4, 18.7, 18.1, 14.3, #> 24.4, 22.8, 19.2, 17.8, 16.4, 17.3, 15.2, 10.4, 10.4, 14.7, 32.4, #> 30.4, 33.9, 21.5, 15.5, 15.2, 13.3, 19.2, 27.3, 26, 30.4, 15.8, #> 19.7, 15, 21.4), cyl = c(6, 6, 4, 6, 8, 6, 8, 4, 4, 6, 6, 8, #> 8, 8, 8, 8, 8, 4, 4, 4, 4, 8, 8, 8, 8, 4, 4, 4, 8, 6, 8, 4), #> disp = c(160, 160, 108, 258, 360, 225, 360, 146.7, 140.8, #> 167.6, 167.6, 275.8, 275.8, 275.8, 472, 460, 440, 78.7, 75.7, #> 71.1, 120.1, 318, 304, 350, 400, 79, 120.3, 95.1, 351, 145, #> 301, 121), hp = c(110, 110, 93, 110, 175, 105, 245, 62, 95, #> 123, 123, 180, 180, 180, 205, 215, 230, 66, 52, 65, 97, 150, #> 150, 245, 175, 66, 91, 113, 264, 175, 335, 109), drat = c(3.9, #> 3.9, 3.85, 3.08, 3.15, 2.76, 3.21, 3.69, 3.92, 3.92, 3.92, #> 3.07, 3.07, 3.07, 2.93, 3, 3.23, 4.08, 4.93, 4.22, 3.7, 2.76, #> 3.15, 3.73, 3.08, 4.08, 4.43, 3.77, 4.22, 3.62, 3.54, 4.11 #> ), wt = c(2.62, 2.875, 2.32, 3.215, 3.44, 3.46, 3.57, 3.19, #> 3.15, 3.44, 3.44, 4.07, 3.73, 3.78, 5.25, 5.424, 5.345, 2.2, #> 1.615, 1.835, 2.465, 3.52, 3.435, 3.84, 3.845, 1.935, 2.14, #> 1.513, 3.17, 2.77, 3.57, 2.78), qsec = c(16.46, 17.02, 18.61, #> 19.44, 17.02, 20.22, 15.84, 20, 22.9, 18.3, 18.9, 17.4, 17.6, #> 18, 17.98, 17.82, 17.42, 19.47, 18.52, 19.9, 20.01, 16.87, #> 17.3, 15.41, 17.05, 18.9, 16.7, 16.9, 14.5, 15.5, 14.6, 18.6 #> ), vs = c(0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, #> 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1), am = c(1, #> 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, #> 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1), gear = c(4, 4, 4, 3, #> 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, #> 3, 3, 4, 5, 5, 5, 5, 5, 4), carb = c(4, 4, 1, 1, 2, 1, 4, #> 2, 2, 4, 4, 3, 3, 3, 4, 4, 4, 1, 2, 1, 1, 2, 2, 4, 2, 1, #> 2, 2, 4, 6, 8, 2)), row.names = c(\"Mazda RX4\", \"Mazda RX4 Wag\", #> \"Datsun 710\", \"Hornet 4 Drive\", \"Hornet Sportabout\", \"Valiant\", #> \"Duster 360\", \"Merc 240D\", \"Merc 230\", \"Merc 280\", \"Merc 280C\", #> \"Merc 450SE\", \"Merc 450SL\", \"Merc 450SLC\", \"Cadillac Fleetwood\", #> \"Lincoln Continental\", \"Chrysler Imperial\", \"Fiat 128\", \"Honda Civic\", #> \"Toyota Corolla\", \"Toyota Corona\", \"Dodge Challenger\", \"AMC Javelin\", #> \"Camaro Z28\", \"Pontiac Firebird\", \"Fiat X1-9\", \"Porsche 914-2\", #> \"Lotus Europa\", \"Ford Pantera L\", \"Ferrari Dino\", \"Maserati Bora\", #> \"Volvo 142E\"), class = \"data.frame\") #> AIC BIC logLik deviance df.resid #> 35.2503 39.6475 -14.6251 29.2503 29 #> Random effects: #> Groups Name Std.Dev. #> vs (Intercept) 0.7896 #> Number of obs: 32, groups: vs, 2 #> Fixed Effects: #> (Intercept) mpg #> -8.7018 0.4085 construct_model( x = mtcars |> dplyr::rename(`M P G` = mpg), formula = reformulate2(c(\"M P G\", \"cyl\"), response = \"hp\"), method = \"lm\" ) |> ard_regression() |> dplyr::filter(stat_name %in% c(\"term\", \"estimate\", \"p.value\")) #> {cards} data frame: 6 x 6 #> variable context stat_name stat_label stat fmt_fn #> 1 M P G regressi… term term `M P G` NULL #> 2 M P G regressi… estimate Coeffici… -2.775 1 #> 3 M P G regressi… p.value p-value 0.213 1 #> 4 cyl regressi… term term cyl NULL #> 5 cyl regressi… estimate Coeffici… 23.979 1 #> 6 cyl regressi… p.value p-value 0.003 1"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-extract_wald_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract data from wald.test object — .extract_wald_results","title":"Extract data from wald.test object — .extract_wald_results","text":"Extract data wald.test object","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-extract_wald_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract data from wald.test object — .extract_wald_results","text":"","code":".extract_wald_results(wald_test)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-extract_wald_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract data from wald.test object — .extract_wald_results","text":"wald_test (data.frame) wald test object object aod::wald.test()","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-extract_wald_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract data from wald.test object — .extract_wald_results","text":"data frame containing wald test results.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_cohens_d_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Cohen's D Test to ARD — .format_cohens_d_results","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"Convert Cohen's D Test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_cohens_d_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"","code":".format_cohens_d_results(by, variable, lst_tidy, paired, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_cohens_d_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). paired TRUE, values x y considered paired. produces effect size equivalent one-sample effect size x - y. See also repeated_measures_d() options. ... passed cohens_d(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_cohens_d_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_cohens_d_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"","code":"cardx:::.format_cohens_d_results( by = \"ARM\", variable = \"AGE\", paired = FALSE, lst_tidy = cards::eval_capture_conditions( effectsize::hedges_g(data[[variable]] ~ data[[by]], paired = FALSE) |> parameters::standardize_names(style = \"broom\") ) ) #> {cards} data frame: 8 x 9 #> group1 variable stat_name stat_label stat error #> 1 ARM AGE estimate Effect S… could no… #> 2 ARM AGE conf.level CI Confi… could no… #> 3 ARM AGE conf.low CI Lower… could no… #> 4 ARM AGE conf.high CI Upper… could no… #> 5 ARM AGE mu H0 Mean 0 could no… #> 6 ARM AGE paired Paired t… FALSE could no… #> 7 ARM AGE pooled_sd Pooled S… TRUE could no… #> 8 ARM AGE alternative Alternat… two.sided could no… #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_hedges_g_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Hedge's G Test to ARD — .format_hedges_g_results","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"Convert Hedge's G Test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_hedges_g_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"","code":".format_hedges_g_results(by, variable, lst_tidy, paired, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_hedges_g_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). paired TRUE, values x y considered paired. produces effect size equivalent one-sample effect size x - y. See also repeated_measures_d() options. ... passed hedges_g(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_hedges_g_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_hedges_g_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"","code":"cardx:::.format_hedges_g_results( by = \"ARM\", variable = \"AGE\", paired = FALSE, lst_tidy = cards::eval_capture_conditions( effectsize::hedges_g(data[[variable]] ~ data[[by]], paired = FALSE) |> parameters::standardize_names(style = \"broom\") ) ) #> {cards} data frame: 8 x 9 #> group1 variable stat_name stat_label stat error #> 1 ARM AGE estimate Effect S… could no… #> 2 ARM AGE conf.level CI Confi… could no… #> 3 ARM AGE conf.low CI Lower… could no… #> 4 ARM AGE conf.high CI Upper… could no… #> 5 ARM AGE mu H0 Mean 0 could no… #> 6 ARM AGE paired Paired t… FALSE could no… #> 7 ARM AGE pooled_sd Pooled S… TRUE could no… #> 8 ARM AGE alternative Alternat… two.sided could no… #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_mcnemartest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert McNemar's test to ARD — .format_mcnemartest_results","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"Convert McNemar's test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_mcnemartest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"","code":".format_mcnemartest_results(by, variable, lst_tidy, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_mcnemartest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). ... passed stats::mcnemar.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_mcnemartest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_mcnemartest_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"","code":"cardx:::.format_mcnemartest_results( by = \"ARM\", variable = \"AGE\", lst_tidy = cards::eval_capture_conditions( stats::mcnemar.test(cards::ADSL[[\"SEX\"]], cards::ADSL[[\"EFFFL\"]]) |> broom::tidy() ) ) #> {cards} data frame: 5 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_mc… statistic X-square… 111.91 #> 2 ARM AGE stats_mc… p.value p-value 0 #> 3 ARM AGE stats_mc… parameter Degrees … 1 #> 4 ARM AGE stats_mc… method method McNemar'… #> 5 ARM AGE stats_mc… correct correct TRUE #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_moodtest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert mood test results to ARD — .format_moodtest_results","title":"Convert mood test results to ARD — .format_moodtest_results","text":"Convert mood test results ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_moodtest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert mood test results to ARD — .format_moodtest_results","text":"","code":".format_moodtest_results(by, variable, lst_tidy, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_moodtest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert mood test results to ARD — .format_moodtest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). ... passed mood.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_moodtest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert mood test results to ARD — .format_moodtest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_moodtest_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert mood test results to ARD — .format_moodtest_results","text":"","code":"cardx:::.format_moodtest_results( by = \"SEX\", variable = \"AGE\", lst_tidy = cards::eval_capture_conditions( stats::mood.test(ADSL[[\"AGE\"]] ~ ADSL[[\"SEX\"]]) |> broom::tidy() ) ) #> {cards} data frame: 4 x 9 #> group1 variable stat_name stat_label stat error #> 1 SEX AGE statistic Z-Statis… object '… #> 2 SEX AGE p.value p-value object '… #> 3 SEX AGE method method object '… #> 4 SEX AGE alternative Alternat… object '… #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_proptest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert prop.test to ARD — .format_proptest_results","title":"Convert prop.test to ARD — .format_proptest_results","text":"Convert prop.test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_proptest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert prop.test to ARD — .format_proptest_results","text":"","code":".format_proptest_results(by, variable, lst_tidy, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_proptest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert prop.test to ARD — .format_proptest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). ... passed prop.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_proptest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert prop.test to ARD — .format_proptest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_survfit_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Tidied Survival Fit to ARD — .format_survfit_results","title":"Convert Tidied Survival Fit to ARD — .format_survfit_results","text":"Convert Tidied Survival Fit ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_survfit_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Tidied Survival Fit to ARD — .format_survfit_results","text":"","code":".format_survfit_results(tidy_survfit)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_survfit_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Tidied Survival Fit to ARD — .format_survfit_results","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_survfit_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Tidied Survival Fit to ARD — .format_survfit_results","text":"","code":"cardx:::.format_survfit_results( broom::tidy(survival::survfit(survival::Surv(AVAL, CNSR) ~ TRTA, cards::ADTTE)) ) #> {cards} data frame: 483 x 14 #> group1 group1_level variable variable_level stat_name stat_label stat n.risk #> 1 TRTA Placebo time 1 estimate Survival… 1 86 #> 2 TRTA Placebo time 1 conf.high CI Upper… 1 86 #> 3 TRTA Placebo time 1 conf.low CI Lower… 1 86 #> 4 TRTA Placebo time 2 estimate Survival… 1 85 #> 5 TRTA Placebo time 2 conf.high CI Upper… 1 85 #> 6 TRTA Placebo time 2 conf.low CI Lower… 1 85 #> 7 TRTA Placebo time 3 estimate Survival… 1 84 #> 8 TRTA Placebo time 3 conf.high CI Upper… 1 84 #> 9 TRTA Placebo time 3 conf.low CI Lower… 1 84 #> 10 TRTA Placebo time 7 estimate Survival… 1 82 #> n.event n.censor std.error #> 1 0 1 0 #> 2 0 1 0 #> 3 0 1 0 #> 4 0 1 0 #> 5 0 1 0 #> 6 0 1 0 #> 7 0 2 0 #> 8 0 2 0 #> 9 0 2 0 #> 10 0 1 0 #> ℹ 473 more rows #> ℹ Use `print(n = ...)` to see more rows #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_ttest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert t-test to ARD — .format_ttest_results","title":"Convert t-test to ARD — .format_ttest_results","text":"Convert t-test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_ttest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert t-test to ARD — .format_ttest_results","text":"","code":".format_ttest_results(by = NULL, variable, lst_tidy, paired, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_ttest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert t-test to ARD — .format_ttest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). paired logical indicating whether want paired t-test. ... passed t.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_ttest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert t-test to ARD — .format_ttest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_ttest_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert t-test to ARD — .format_ttest_results","text":"","code":"cardx:::.format_ttest_results( by = \"ARM\", variable = \"AGE\", paired = FALSE, lst_tidy = cards::eval_capture_conditions( stats::t.test(ADSL[[\"AGE\"]] ~ ADSL[[\"ARM\"]], paired = FALSE) |> broom::tidy() ) ) #> {cards} data frame: 14 x 9 #> group1 variable stat_name stat_label stat error #> 1 ARM AGE estimate Mean Dif… object '… #> 2 ARM AGE estimate1 Group 1 … object '… #> 3 ARM AGE estimate2 Group 2 … object '… #> 4 ARM AGE statistic t Statis… object '… #> 5 ARM AGE p.value p-value object '… #> 6 ARM AGE parameter Degrees … object '… #> 7 ARM AGE conf.low CI Lower… object '… #> 8 ARM AGE conf.high CI Upper… object '… #> 9 ARM AGE method method object '… #> 10 ARM AGE alternative alternat… object '… #> 11 ARM AGE mu H0 Mean 0 object '… #> 12 ARM AGE paired Paired t… FALSE object '… #> 13 ARM AGE var.equal Equal Va… FALSE object '… #> 14 ARM AGE conf.level CI Confi… 0.95 object '… #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_wilcoxtest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"Convert Wilcoxon test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_wilcoxtest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"","code":".format_wilcoxtest_results(by = NULL, variable, lst_tidy, paired, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_wilcoxtest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). paired logical indicating whether want paired test. ... passed stats::wilcox.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_wilcoxtest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-format_wilcoxtest_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"","code":"# Pre-processing ADSL to have grouping factor (ARM here) with 2 levels ADSL <- cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_stats_wilcox_test(by = \"ARM\", variables = \"AGE\") cardx:::.format_wilcoxtest_results( by = \"ARM\", variable = \"AGE\", paired = FALSE, lst_tidy = cards::eval_capture_conditions( stats::wilcox.test(ADSL[[\"AGE\"]] ~ ADSL[[\"ARM\"]], paired = FALSE) |> broom::tidy() ) ) #> {cards} data frame: 12 x 9 #> group1 variable stat_name stat_label stat error #> 1 ARM AGE statistic X-square… invalid … #> 2 ARM AGE p.value p-value invalid … #> 3 ARM AGE method method invalid … #> 4 ARM AGE alternative alternat… invalid … #> 5 ARM AGE mu mu 0 invalid … #> 6 ARM AGE paired Paired t… FALSE invalid … #> 7 ARM AGE exact exact invalid … #> 8 ARM AGE correct correct TRUE invalid … #> 9 ARM AGE conf.int conf.int FALSE invalid … #> 10 ARM AGE conf.level CI Confi… 0.95 invalid … #> 11 ARM AGE tol.root tol.root 0 invalid … #> 12 ARM AGE digits.rank digits.r… Inf invalid … #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-paired_data_pivot_wider.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert long paired data to wide — .paired_data_pivot_wider","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"Convert long paired data wide","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-paired_data_pivot_wider.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"","code":".paired_data_pivot_wider(data, by, variable, id)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-paired_data_pivot_wider.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"data (data.frame) data frame one line per subject per group (string) column name variable (string) variable column name id (string) subject id column name","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-paired_data_pivot_wider.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"wide data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-paired_data_pivot_wider.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"","code":"cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> cardx:::.paired_data_pivot_wider(by = \"ARM\", variable = \"AGE\", id = \"USUBJID\") #> # A tibble: 86 × 3 #> USUBJID by1 by2 #> #> 1 1 63 71 #> 2 2 64 77 #> 3 3 85 81 #> 4 4 52 75 #> 5 5 84 57 #> 6 6 79 56 #> 7 7 81 79 #> 8 8 69 56 #> 9 9 63 61 #> 10 10 81 56 #> # ℹ 76 more rows"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_probs.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"Process Survival Fit Quantile Estimates","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_probs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"","code":".process_survfit_probs(x, probs)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_probs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"x (survival::survfit()) survival::survfit() object. See details. probs (numeric) vector probabilities values (0,1) specifying survival quantiles return.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_probs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"tibble","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_probs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"","code":"survival::survfit(survival::Surv(AVAL, CNSR) ~ TRTA, cards::ADTTE) |> cardx:::.process_survfit_probs(probs = c(0.25, 0.75)) #> # A tibble: 6 × 6 #> strata estimate conf.low conf.high prob context #> #> 1 TRTA=Placebo 142 70 181 0.25 survival_survfit #> 2 TRTA=Xanomeline High Dose 44 22 180 0.25 survival_survfit #> 3 TRTA=Xanomeline Low Dose 49 37 180 0.25 survival_survfit #> 4 TRTA=Placebo 184 183 191 0.75 survival_survfit #> 5 TRTA=Xanomeline High Dose 188 167 NA 0.75 survival_survfit #> 6 TRTA=Xanomeline Low Dose 184 180 NA 0.75 survival_survfit"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_time.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Survival Fit For Time Estimates — .process_survfit_time","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"Process Survival Fit Time Estimates","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_time.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"","code":".process_survfit_time(x, times, type)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_time.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"x (survival::survfit()) survival::survfit() object. See details. times (numeric) vector times return survival probabilities. type (string NULL) type statistic report. Available Kaplan-Meier time estimates , otherwise type ignored. Default NULL. Must one following:","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_time.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"tibble","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-process_survfit_time.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"","code":"survival::survfit(survival::Surv(AVAL, CNSR) ~ TRTA, cards::ADTTE) |> cardx:::.process_survfit_time(times = c(60, 180), type = \"risk\") #> # A tibble: 6 × 6 #> time estimate conf.low conf.high strata context #> #> 1 60 0.107 0.0338 0.175 TRTA=Placebo risk #> 2 60 0.306 0.151 0.432 TRTA=Xanomeline High Dose risk #> 3 60 0.268 0.122 0.390 TRTA=Xanomeline Low Dose risk #> 4 180 0.349 0.217 0.459 TRTA=Placebo risk #> 5 180 0.738 0.251 0.908 TRTA=Xanomeline High Dose risk #> 6 180 0.619 0.257 0.805 TRTA=Xanomeline Low Dose risk"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-strata_normal_quantile.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"function wraps estimation stratified percentiles assume approximation large numbers. necessary case proportions strata unequal.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-strata_normal_quantile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"","code":".strata_normal_quantile(vars, weights, conf.level)"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-strata_normal_quantile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"weights (numeric NULL) weights level strata. NULL, estimated using iterative algorithm minimizes weighted squared length confidence interval. conf.level (numeric) scalar (0, 1) indicating confidence level. Default 0.95","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-strata_normal_quantile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"Stratified quantile.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/reference/dot-strata_normal_quantile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"","code":"strata_data <- table(data.frame( \"f1\" = sample(c(TRUE, FALSE), 100, TRUE), \"f2\" = sample(c(\"x\", \"y\", \"z\"), 100, TRUE), stringsAsFactors = TRUE )) ns <- colSums(strata_data) ests <- strata_data[\"TRUE\", ] / ns vars <- ests * (1 - ests) / ns weights <- rep(1 / length(ns), length(ns)) cardx:::.strata_normal_quantile(vars, weights, 0.95) #> [1] 1.134584"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-update_weights_strat_wilson.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"function wraps iteration procedure allows estimate weights proportional strata. assumes minimize weighted squared length confidence interval.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-update_weights_strat_wilson.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"","code":".update_weights_strat_wilson( vars, strata_qnorm, initial_weights, n_per_strata, max.iterations = 50, conf.level = 0.95, tol = 0.001 )"},{"path":"https://insightsengineering.github.io/cardx/reference/dot-update_weights_strat_wilson.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"vars (numeric) normalized proportions strata. strata_qnorm (numeric) initial estimation identical weights quantiles. initial_weights (numeric) initial weights used calculate strata_qnorm. can optimized future need estimate better initial weights. n_per_strata (numeric) number elements strata. max.iterations (count) maximum number iterations tried. Convergence always checked. conf.level (numeric) scalar (0, 1) indicating confidence level. Default 0.95 tol (number) tolerance threshold convergence.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/dot-update_weights_strat_wilson.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"list 3 elements: n_it, weights, diff_v.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/reference/dot-update_weights_strat_wilson.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"","code":"vs <- c(0.011, 0.013, 0.012, 0.014, 0.017, 0.018) sq <- 0.674 ws <- rep(1 / length(vs), length(vs)) ns <- c(22, 18, 17, 17, 14, 12) cardx:::.update_weights_strat_wilson(vs, sq, ws, ns, 100, 0.95, 0.001) #> $n_it #> [1] 3 #> #> $weights #> [1] 0.2067191 0.1757727 0.1896962 0.1636346 0.1357615 0.1284160 #> #> $diff_v #> [1] 1.458717e-01 1.497223e-03 1.442189e-06 #>"},{"path":"https://insightsengineering.github.io/cardx/reference/proportion_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"Functions calculate different proportion confidence intervals use ard_proportion().","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/proportion_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"","code":"proportion_ci_wald(x, conf.level = 0.95, correct = FALSE) proportion_ci_wilson(x, conf.level = 0.95, correct = FALSE) proportion_ci_clopper_pearson(x, conf.level = 0.95) proportion_ci_agresti_coull(x, conf.level = 0.95) proportion_ci_jeffreys(x, conf.level = 0.95) proportion_ci_strat_wilson( x, strata, weights = NULL, conf.level = 0.95, max.iterations = 10L, correct = FALSE )"},{"path":"https://insightsengineering.github.io/cardx/reference/proportion_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"x vector binary values, .e. logical vector, numeric values c(0, 1) conf.level (numeric) scalar (0, 1) indicating confidence level. Default 0.95 correct (flag) include continuity correction. information, see example stats::prop.test(). strata (factor) variable one level per stratum length x. weights (numeric NULL) weights level strata. NULL, estimated using iterative algorithm minimizes weighted squared length confidence interval. max.iterations (count) maximum number iterations iterative procedure used find estimates optimal weights.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/proportion_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"Confidence interval proportion.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/proportion_ci.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"proportion_ci_wald(): Calculates Wald interval following usual textbook definition single proportion confidence interval using normal approximation. $$\\hat{p} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\hat{p}(1 - \\hat{p})}{n}}$$ proportion_ci_wilson(): Calculates Wilson interval calling stats::prop.test(). Also referred Wilson score interval. $$\\frac{\\hat{p} + \\frac{z^2_{\\alpha/2}}{2n} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\hat{p}(1 - \\hat{p})}{n} + \\frac{z^2_{\\alpha/2}}{4n^2}}}{1 + \\frac{z^2_{\\alpha/2}}{n}}$$ proportion_ci_clopper_pearson(): Calculates Clopper-Pearson interval calling stats::binom.test(). Also referred exact method. $$ \\left( \\frac{k}{n} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\frac{k}{n}(1-\\frac{k}{n})}{n} + \\frac{z^2_{\\alpha/2}}{4n^2}} \\right) / \\left( 1 + \\frac{z^2_{\\alpha/2}}{n} \\right)$$ proportion_ci_agresti_coull(): Calculates Agresti-Coull interval (created Alan Agresti Brent Coull) (95% CI) adding two successes two failures data using Wald formula construct CI. $$ \\left( \\frac{\\tilde{p} + z^2_{\\alpha/2}/2}{n + z^2_{\\alpha/2}} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\tilde{p}(1 - \\tilde{p})}{n} + \\frac{z^2_{\\alpha/2}}{4n^2}} \\right)$$ proportion_ci_jeffreys(): Calculates Jeffreys interval, equal-tailed interval based non-informative Jeffreys prior binomial proportion. $$\\left( \\text{Beta}\\left(\\frac{k}{2} + \\frac{1}{2}, \\frac{n - k}{2} + \\frac{1}{2}\\right)_\\alpha, \\text{Beta}\\left(\\frac{k}{2} + \\frac{1}{2}, \\frac{n - k}{2} + \\frac{1}{2}\\right)_{1-\\alpha} \\right)$$ proportion_ci_strat_wilson(): Calculates stratified Wilson confidence interval unequal proportions described Xin YA, Su XG. Stratified Wilson Newcombe confidence intervals multiple binomial proportions. Statistics Biopharmaceutical Research. 2010;2(3). $$\\frac{\\hat{p}_j + \\frac{z^2_{\\alpha/2}}{2n_j} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\hat{p}_j(1 - \\hat{p}_j)}{n_j} + \\frac{z^2_{\\alpha/2}}{4n_j^2}}}{1 + \\frac{z^2_{\\alpha/2}}{n_j}}$$","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/proportion_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"","code":"x <- c( TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE ) proportion_ci_wald(x, conf.level = 0.9) #> $N #> [1] 10 #> #> $estimate #> [1] 0.5 #> #> $conf.low #> [1] 0.2399258 #> #> $conf.high #> [1] 0.7600742 #> #> $conf.level #> [1] 0.9 #> #> $method #> Wald Confidence Interval without continuity correction #> proportion_ci_wilson(x, correct = TRUE) #> $N #> [1] 10 #> #> $conf.level #> [1] 0.95 #> #> $estimate #> p #> 0.5 #> #> $statistic #> X-squared #> 0 #> #> $p.value #> [1] 1 #> #> $parameter #> df #> 1 #> #> $conf.low #> [1] 0.2365931 #> #> $conf.high #> [1] 0.7634069 #> #> $method #> Wilson Confidence Interval with continuity correction #> #> $alternative #> [1] \"two.sided\" #> proportion_ci_clopper_pearson(x) #> $N #> [1] 10 #> #> $conf.level #> [1] 0.95 #> #> $estimate #> probability of success #> 0.5 #> #> $statistic #> number of successes #> 5 #> #> $p.value #> [1] 1 #> #> $parameter #> number of trials #> 10 #> #> $conf.low #> [1] 0.187086 #> #> $conf.high #> [1] 0.812914 #> #> $method #> [1] \"Clopper-Pearson Confidence Interval\" #> #> $alternative #> [1] \"two.sided\" #> proportion_ci_agresti_coull(x) #> $N #> [1] 10 #> #> $estimate #> [1] 0.5 #> #> $conf.low #> [1] 0.2365931 #> #> $conf.high #> [1] 0.7634069 #> #> $conf.level #> [1] 0.95 #> #> $method #> [1] \"Agresti-Coull Confidence Interval\" #> proportion_ci_jeffreys(x) #> $N #> [1] 10 #> #> $estimate #> [1] 0.5 #> #> $conf.low #> [1] 0.2235287 #> #> $conf.high #> [1] 0.7764713 #> #> $conf.level #> [1] 0.95 #> #> $method #> Jeffreys Interval #> # Stratified Wilson confidence interval with unequal probabilities set.seed(1) rsp <- sample(c(TRUE, FALSE), 100, TRUE) strata_data <- data.frame( \"f1\" = sample(c(\"a\", \"b\"), 100, TRUE), \"f2\" = sample(c(\"x\", \"y\", \"z\"), 100, TRUE), stringsAsFactors = TRUE ) strata <- interaction(strata_data) n_strata <- ncol(table(rsp, strata)) # Number of strata proportion_ci_strat_wilson( x = rsp, strata = strata, conf.level = 0.90 ) #> $N #> [1] 100 #> #> $estimate #> [1] 0.49 #> #> $conf.low #> [1] 0.4072891 #> #> $conf.high #> [1] 0.5647887 #> #> $conf.level #> [1] 0.9 #> #> $weights #> a.x b.x a.y b.y a.z b.z #> 0.2074199 0.1776464 0.1915610 0.1604678 0.1351096 0.1277952 #> #> $method #> Stratified Wilson Confidence Interval without continuity correction #> # Not automatic setting of weights proportion_ci_strat_wilson( x = rsp, strata = strata, weights = rep(1 / n_strata, n_strata), conf.level = 0.90 ) #> $N #> [1] 100 #> #> $estimate #> [1] 0.49 #> #> $conf.low #> [1] 0.4190436 #> #> $conf.high #> [1] 0.5789733 #> #> $conf.level #> [1] 0.9 #> #> $method #> Stratified Wilson Confidence Interval without continuity correction #>"},{"path":"https://insightsengineering.github.io/cardx/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. dplyr %>%, all_of, any_of, contains, ends_with, everything, last_col, matches, num_range, one_of, starts_with, ","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/news/index.html","id":"breaking-changes-0-1-0-9033","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"cardx 0.1.0.9033","text":"Updated function names follow pattern ard__(). Former functions names deprecated. (#106)","code":"ard_ttest() -> ard_stats_t_test() ard_paired_ttest() -> ard_stats_paired_t_test() ard_wilcoxtest() -> ard_stats_wilcox_test() ard_paired_wilcoxtest() -> ard_stats_paired_wilcox_test() ard_chisqtest() -> ard_stats_chisq_test() ard_fishertest() -> ard_stats_fisher_test() ard_kruskaltest() -> ard_stats_kruskal_test() ard_mcnemartest() -> ard_stats_mcnemar_test() ard_moodtest() -> ard_stats_mood_test()"},{"path":"https://insightsengineering.github.io/cardx/news/index.html","id":"new-features-0-1-0-9033","dir":"Changelog","previous_headings":"","what":"New Features","title":"cardx 0.1.0.9033","text":"Added following functions calculating Analysis Results Data (ARD). ard_stats_aov() calculating ANOVA results using stats::aov(). (#3) ard_stats_anova() calculating ANOVA results using stats::anova(). (#12) ard_stats_mcnemar_test_long() McNemar’s test long data using stats::mcnemar.test(). ard_aod_wald_test() calculating Wald Tests regression models using aod::wald.test(). (#84) ard_car_anova() calculating ANOVA results using car::Anova(). (#3) ard_stats_oneway_test() calculating ANOVA results using stats::oneway.test(). (#3) ard_effectsize_cohens_d(), ard_effectsize_paired_cohens_d(), ard_effectsize_hedges_g(), ard_effectsize_paired_hedges_g() standardized differences using effectsize::cohens_d() effectsize::hedges_g(). (#50) ard_stats_prop_test() tests proportions using stats::prop.test(). (#64) ard_regression_basic() basic regression models. function focuses matching terms underlying variables names. (#46) ard_smd_smd() calculating standardized mean differences using smd::smd(). (#4) ard_survival_survfit() survival analyses using survival::survfit(). (#43) ard_survey_svycontinuous() calculating univariate summary statistics weighted/survey data using many functions {survey} package. (#68) ard_survey_svychisq() weighted/survey chi-squared test using survey::svychisq(). (#72) ard_survey_svyttest() weighted/survey t-tests using survey::svyttest(). (#70) ard_survey_svyranktest() weighted/survey rank tests using survey::svyranktest(). (#71) ard_car_vif() calculating variance inflation factor using car::vif(). (#10) ard_emmeans_mean_difference() calculating least-squares mean differences using {emmeans} package. (#34) Updated functions ard_stats_t_test(), ard_stats_paired_t_test(), ard_stats_wilcox_test(), ard_stats_paired_wilcox_test(), ard_stats_chisq_test(), ard_stats_fisher_test(), ard_stats_kruskal_test(), ard_stats_mcnemar_test(), ard_stats_mood_test() accept multiple variables . Independent tests calculated variable. variable argument renamed variables. (#77) Updated ard_stats_t_test() ard_stats_wilcox_test() longer require argument, yields central estimates confidence intervals. (#82) Imported cli call environment functions https://github.com/ddsjoberg/standalone/blob/main/R/standalone-cli_call_env.R implemented set_cli_abort_call user-facing functions. (#111) Added ard_survival_survdiff() creating results survival::survdiff(). (#113)","code":""},{"path":"https://insightsengineering.github.io/cardx/news/index.html","id":"cardx-010","dir":"Changelog","previous_headings":"","what":"cardx 0.1.0","title":"cardx 0.1.0","text":"CRAN release: 2024-03-18 Initial release.","code":""}] +[{"path":[]},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/main/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Daniel Sjoberg. Author, maintainer. Abinaya Yogasekaram. Author. Emily de la Rua. Author. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Sjoberg D, Yogasekaram , de la Rua E (2024). cardx: Extra Analysis Results Data Utilities. R package version 0.1.0.9033, https://github.com/insightsengineering/cardx.","code":"@Manual{, title = {cardx: Extra Analysis Results Data Utilities}, author = {Daniel Sjoberg and Abinaya Yogasekaram and Emily {de la Rua}}, year = {2024}, note = {R package version 0.1.0.9033}, url = {https://github.com/insightsengineering/cardx}, }"},{"path":"https://insightsengineering.github.io/cardx/main/index.html","id":"cardx-","dir":"","previous_headings":"","what":"Extra Analysis Results Data Utilities","title":"Extra Analysis Results Data Utilities","text":"{cardx} package extension {cards} package, providing additional functions create Analysis Results Data Objects (ARDs) using R programming language. {cardx} package exports ARD functions uses utility functions {cards} statistical functions additional packages (, {stats}, {mmrm}, {emmeans}, {car}, {survey}, etc.) construct summary objects. Summary objects can used : Generate Tables visualizations Regulatory Submission easily R. Perfect presenting descriptive statistics, statistical analyses, regressions, etc. . Conduct Quality Control checks existing Tables R. Storing results test parameters supports re-use verification data analyses.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Extra Analysis Results Data Utilities","text":"Install cards CRAN : can install development version cards GitHub :","code":"install.packages(\"cardx\") # install.packages(\"devtools\") devtools::install_github(\"insightsengineering/cardx\")"},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/main/index.html","id":"example-ard-creation","dir":"","previous_headings":"Examples","what":"Example ARD Creation","title":"Extra Analysis Results Data Utilities","text":"Example t-test: Note returned ARD contains analysis results addition function parameters used calculate results allowing reproducible future analyses customization.","code":"library(cardx) cards::ADSL |> # keep two treatment arms for the t-test calculation dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> cardx::ard_stats_t_test(by = ARM, variable = AGE) ## {cards} data frame: 14 x 9 ## group1 variable context stat_name stat_label stat ## 1 ARM AGE stats_t_… estimate Mean Dif… 0.828 ## 2 ARM AGE stats_t_… estimate1 Group 1 … 75.209 ## 3 ARM AGE stats_t_… estimate2 Group 2 … 74.381 ## 4 ARM AGE stats_t_… statistic t Statis… 0.655 ## 5 ARM AGE stats_t_… p.value p-value 0.513 ## 6 ARM AGE stats_t_… parameter Degrees … 167.362 ## 7 ARM AGE stats_t_… conf.low CI Lower… -1.668 ## 8 ARM AGE stats_t_… conf.high CI Upper… 3.324 ## 9 ARM AGE stats_t_… method method Welch Tw… ## 10 ARM AGE stats_t_… alternative alternat… two.sided ## 11 ARM AGE stats_t_… mu H0 Mean 0 ## 12 ARM AGE stats_t_… paired Paired t… FALSE ## 13 ARM AGE stats_t_… var.equal Equal Va… FALSE ## 14 ARM AGE stats_t_… conf.level CI Confi… 0.95 ## ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/index.html","id":"model-input","dir":"","previous_headings":"Examples","what":"Model Input","title":"Extra Analysis Results Data Utilities","text":"{cardx} functions accept regression model objects input: Note Analysis Results Standard begin data set rather model object. accomplish include model construction helpers.","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_aod_wald_test() construct_model( x = cards::ADSL, formula = reformulate2(\"ARM\", response = \"AGE\"), method = \"lm\" ) |> ard_aod_wald_test() ## {cards} data frame: 6 x 8 ## variable context stat_name stat_label stat fmt_fn ## 1 (Intercept) aod_wald… df Degrees … 1 1 ## 2 (Intercept) aod_wald… statistic Statistic 7126.713 1 ## 3 (Intercept) aod_wald… p.value p-value 0 1 ## 4 ARM aod_wald… df Degrees … 2 1 ## 5 ARM aod_wald… statistic Statistic 1.046 1 ## 6 ARM aod_wald… p.value p-value 0.593 1 ## ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/index.html","id":"additional-resources","dir":"","previous_headings":"","what":"Additional Resources","title":"Extra Analysis Results Data Utilities","text":"best resources help documents accompanying {cardx} function. Supporting documentation companion packages {cards} {gtsummary} useful understanding ARD workflow capabilities.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_aod_wald_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Wald Test — ard_aod_wald_test","title":"ARD Wald Test — ard_aod_wald_test","text":"Function takes regression model object calculates Wald statistical test using aod::wald.test().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_aod_wald_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Wald Test — ard_aod_wald_test","text":"","code":"ard_aod_wald_test(x, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_aod_wald_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Wald Test — ard_aod_wald_test","text":"x regression model object ... arguments passed aod::wald.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_aod_wald_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Wald Test — ard_aod_wald_test","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_aod_wald_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Wald Test — ard_aod_wald_test","text":"","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_aod_wald_test() #> {cards} data frame: 6 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 (Intercept) aod_wald… df Degrees … 1 1 #> 2 (Intercept) aod_wald… statistic Statistic 7126.713 1 #> 3 (Intercept) aod_wald… p.value p-value 0 1 #> 4 ARM aod_wald… df Degrees … 2 1 #> 5 ARM aod_wald… statistic Statistic 1.046 1 #> 6 ARM aod_wald… p.value p-value 0.593 1 #> ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_anova.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD ANOVA from car Package — ard_car_anova","title":"ARD ANOVA from car Package — ard_car_anova","text":"Function takes regression model object calculated ANOVA using car::Anova().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD ANOVA from car Package — ard_car_anova","text":"","code":"ard_car_anova(x, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD ANOVA from car Package — ard_car_anova","text":"x regression model object ... arguments passed car::Anova(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD ANOVA from car Package — ard_car_anova","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_anova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD ANOVA from car Package — ard_car_anova","text":"","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_car_anova() #> {cards} data frame: 5 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 ARM car_anova sumsq sumsq 71.386 1 #> 2 ARM car_anova df Degrees … 2 1 #> 3 ARM car_anova meansq meansq 35.693 1 #> 4 ARM car_anova statistic Statistic 0.523 1 #> 5 ARM car_anova p.value p-value 0.593 1 #> ℹ 2 more variables: warning, error glm(vs ~ factor(cyl) + factor(am), data = mtcars, family = binomial) |> ard_car_anova(test.statistic = \"Wald\") #> {cards} data frame: 6 x 8 #> variable context stat_name stat_label stat warning #> 1 factor(cyl) car_anova statistic Statistic 0 glm.fit:… #> 2 factor(cyl) car_anova df Degrees … 2 glm.fit:… #> 3 factor(cyl) car_anova p.value p-value 1 glm.fit:… #> 4 factor(am) car_anova statistic Statistic 0 glm.fit:… #> 5 factor(am) car_anova df Degrees … 1 glm.fit:… #> 6 factor(am) car_anova p.value p-value 0.998 glm.fit:… #> ℹ 2 more variables: fmt_fn, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_vif.html","id":null,"dir":"Reference","previous_headings":"","what":"Regression VIF ARD — ard_car_vif","title":"Regression VIF ARD — ard_car_vif","text":"Function takes regression model object returns variance inflation factor (VIF) using car::vif() converts ARD structure","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_vif.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regression VIF ARD — ard_car_vif","text":"","code":"ard_car_vif(x, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_vif.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regression VIF ARD — ard_car_vif","text":"x regression model object See car::vif() details ... arguments passed car::vif(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_vif.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Regression VIF ARD — ard_car_vif","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_car_vif.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Regression VIF ARD — ard_car_vif","text":"","code":"lm(AGE ~ ARM + SEX, data = cards::ADSL) |> ard_car_vif() #> {cards} data frame: 6 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 ARM car_vif GVIF GVIF 1.016 1 #> 2 ARM car_vif df df 2 1 #> 3 ARM car_vif aGVIF Adjusted… 1.004 1 #> 4 SEX car_vif GVIF GVIF 1.016 1 #> 5 SEX car_vif df df 1 1 #> 6 SEX car_vif aGVIF Adjusted… 1.008 1 #> ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_cohens_d.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Cohen's D Test — ard_effectsize_cohens_d","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"Analysis results data paired non-paired Cohen's D Effect Size Test using effectsize::cohens_d().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_cohens_d.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"","code":"ard_effectsize_cohens_d(data, by, variables, conf.level = 0.95, ...) ard_effectsize_paired_cohens_d(data, by, variables, id, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_cohens_d.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"data (data.frame) data frame. See details. (tidy-select) column name compare . Must categorical variable exactly two levels. variables (tidy-select) column names compared. Must continuous variables. Independent tests run variable. conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed effectsize::cohens_d(...) id (tidy-select) column name subject participant ID","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_cohens_d.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_cohens_d.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"ard_effectsize_cohens_d() function, data expected one row per subject. data passed effectsize::cohens_d(data[[variable]]~data[[]], data, paired = FALSE, ...). ard_effectsize_paired_cohens_d() function, data expected one row per subject per level. effect size calculated, data reshaped wide format one row per subject. data passed effectsize::cohens_d(x = data_wide[[]], y = data_wide[[]], paired = TRUE, ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_cohens_d.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Cohen's D Test — ard_effectsize_cohens_d","text":"","code":"cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_effectsize_cohens_d(by = ARM, variables = AGE) #> {cards} data frame: 8 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE effectsi… estimate Effect S… 0.1 #> 2 ARM AGE effectsi… conf.level CI Confi… 0.95 #> 3 ARM AGE effectsi… conf.low CI Lower… -0.201 #> 4 ARM AGE effectsi… conf.high CI Upper… 0.401 #> 5 ARM AGE effectsi… mu H0 Mean 0 #> 6 ARM AGE effectsi… paired Paired t… FALSE #> 7 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 8 ARM AGE effectsi… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error # constructing a paired data set, # where patients receive both treatments cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> dplyr::group_by(USUBJID) |> dplyr::filter(dplyr::n() > 1) |> ard_effectsize_paired_cohens_d(by = ARM, variables = AGE, id = USUBJID) #> {cards} data frame: 8 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE effectsi… estimate Effect S… 0.069 #> 2 ARM AGE effectsi… conf.level CI Confi… 0.95 #> 3 ARM AGE effectsi… conf.low CI Lower… -0.146 #> 4 ARM AGE effectsi… conf.high CI Upper… 0.282 #> 5 ARM AGE effectsi… mu H0 Mean 0 #> 6 ARM AGE effectsi… paired Paired t… TRUE #> 7 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 8 ARM AGE effectsi… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_hedges_g.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Hedge's G Test — ard_effectsize_hedges_g","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"Analysis results data paired non-paired Hedge's G Effect Size Test using effectsize::hedges_g().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_hedges_g.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"","code":"ard_effectsize_hedges_g(data, by, variables, conf.level = 0.95, ...) ard_effectsize_paired_hedges_g(data, by, variables, id, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_hedges_g.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"data (data.frame) data frame. See details. (tidy-select) column name compare . Must categorical variable exactly two levels. variables (tidy-select) column names compared. Must continuous variable. Independent tests run variable conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed effectsize::hedges_g(...) id (tidy-select) column name subject participant ID","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_hedges_g.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_hedges_g.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"ard_effectsize_hedges_g() function, data expected one row per subject. data passed effectsize::hedges_g(data[[variable]]~data[[]], data, paired = FALSE, ...). ard_effectsize_paired_hedges_g() function, data expected one row per subject per level. effect size calculated, data reshaped wide format one row per subject. data passed effectsize::hedges_g(x = data_wide[[]], y = data_wide[[]], paired = TRUE, ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_effectsize_hedges_g.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Hedge's G Test — ard_effectsize_hedges_g","text":"","code":"cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_effectsize_hedges_g(by = ARM, variables = AGE) #> {cards} data frame: 8 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE effectsi… estimate Effect S… 0.1 #> 2 ARM AGE effectsi… conf.level CI Confi… 0.95 #> 3 ARM AGE effectsi… conf.low CI Lower… -0.2 #> 4 ARM AGE effectsi… conf.high CI Upper… 0.399 #> 5 ARM AGE effectsi… mu H0 Mean 0 #> 6 ARM AGE effectsi… paired Paired t… FALSE #> 7 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 8 ARM AGE effectsi… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error # constructing a paired data set, # where patients receive both treatments cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> dplyr::group_by(USUBJID) |> dplyr::filter(dplyr::n() > 1) |> ard_effectsize_paired_hedges_g(by = ARM, variables = AGE, id = USUBJID) #> {cards} data frame: 8 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE effectsi… estimate Effect S… 0.068 #> 2 ARM AGE effectsi… conf.level CI Confi… 0.95 #> 3 ARM AGE effectsi… conf.low CI Lower… -0.144 #> 4 ARM AGE effectsi… conf.high CI Upper… 0.28 #> 5 ARM AGE effectsi… mu H0 Mean 0 #> 6 ARM AGE effectsi… paired Paired t… TRUE #> 7 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 8 ARM AGE effectsi… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_emmeans_mean_difference.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD for LS Mean Difference — ard_emmeans_mean_difference","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"function calculates least-squares mean differences using 'emmeans' package using following arguments data, formula, method, method.args, package used construct regression model via cardx::construct_model().","code":"emmeans::emmeans(object = , specs = ~ ) |> emmeans::contrast(method = \"pairwise\") |> summary(infer = TRUE, level = )"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_emmeans_mean_difference.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"","code":"ard_emmeans_mean_difference( data, formula, method, method.args = list(), package = \"base\", response_type = c(\"continuous\", \"dichotomous\"), conf.level = 0.95, primary_covariate = getElement(attr(stats::terms(formula), \"term.labels\"), 1L) )"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_emmeans_mean_difference.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"data (data.frame/survey.design) data frame survey design object formula (formula) formula method (string) string naming function called, e.g. \"glm\". function belongs library attached, package name must specified package argument. method.args (named list) named list arguments passed fn. package (string) string package name temporarily loaded function specified method executed. response_type (string) string indicating whether model outcome 'continuous' 'dichotomous'. 'dichotomous', call emmeans::emmeans() supplemented argument regrid=\"response\". conf.level (scalar numeric) confidence level confidence interval. Default 0.95. primary_covariate (string) string indicating primary covariate (typically dichotomous treatment variable). Default first covariate listed formula.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_emmeans_mean_difference.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_emmeans_mean_difference.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD for LS Mean Difference — ard_emmeans_mean_difference","text":"","code":"ard_emmeans_mean_difference( data = mtcars, formula = mpg ~ am + cyl, method = \"lm\" ) #> {cards} data frame: 8 x 10 #> group1 variable variable_level stat_name stat_label stat #> 1 am contrast am0 - am1 estimate Mean Dif… -2.567 #> 2 am contrast am0 - am1 std.error std.error 1.291 #> 3 am contrast am0 - am1 df df 29 #> 4 am contrast am0 - am1 conf.low CI Lower… -5.208 #> 5 am contrast am0 - am1 conf.high CI Upper… 0.074 #> 6 am contrast am0 - am1 p.value p-value 0.056 #> 7 am contrast am0 - am1 conf.level CI Confi… 0.95 #> 8 am contrast am0 - am1 method method Least-sq… #> ℹ 4 more variables: context, fmt_fn, warning, error ard_emmeans_mean_difference( data = mtcars, formula = vs ~ am + mpg, method = \"glm\", method.args = list(family = binomial), response_type = \"dichotomous\" ) #> {cards} data frame: 8 x 10 #> group1 variable variable_level stat_name stat_label stat #> 1 am contrast am0 - am1 estimate Mean Dif… 0.61 #> 2 am contrast am0 - am1 std.error std.error 0.229 #> 3 am contrast am0 - am1 df df Inf #> 4 am contrast am0 - am1 conf.low CI Lower… 0.162 #> 5 am contrast am0 - am1 conf.high CI Upper… 1.059 #> 6 am contrast am0 - am1 p.value p-value 0.008 #> 7 am contrast am0 - am1 conf.level CI Confi… 0.95 #> 8 am contrast am0 - am1 method method Least-sq… #> ℹ 4 more variables: context, fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_proportion_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Proportion Confidence Intervals — ard_proportion_ci","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"Calculate confidence intervals proportions.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_proportion_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"","code":"ard_proportion_ci( data, variables, by = dplyr::group_vars(data), conf.level = 0.95, strata, weights = NULL, max.iterations = 10, method = c(\"waldcc\", \"wald\", \"clopper-pearson\", \"wilson\", \"wilsoncc\", \"strat_wilson\", \"strat_wilsoncc\", \"agresti-coull\", \"jeffreys\") )"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_proportion_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"data (data.frame) data frame variables (tidy-select) columns include summaries. Columns must class values coded c(0, 1). (tidy-select) columns stratify calculations conf.level (numeric) scalar (0, 1) indicating confidence level. Default 0.95 strata, weights, max.iterations arguments passed proportion_ci_strat_wilson(), method='strat_wilson' method (string) string indicating type confidence interval calculate. Must one 'waldcc', 'wald', 'clopper-pearson', 'wilson', 'wilsoncc', 'strat_wilson', 'strat_wilsoncc', 'agresti-coull', 'jeffreys'. See ?proportion_ci details.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_proportion_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_proportion_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Proportion Confidence Intervals — ard_proportion_ci","text":"","code":"ard_proportion_ci(mtcars, variables = c(vs, am), method = \"wilson\") #> {cards} data frame: 20 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 vs proporti… N N 32 0 #> 2 vs proporti… conf.level conf.lev… 0.95 1 #> 3 vs proporti… estimate estimate 0.438 1 #> 4 vs proporti… statistic statistic 0.5 1 #> 5 vs proporti… p.value p.value 0.48 1 #> 6 vs proporti… parameter parameter 1 0 #> 7 vs proporti… conf.low conf.low 0.282 1 #> 8 vs proporti… conf.high conf.high 0.607 1 #> 9 vs proporti… method method Wilson C… #> 10 vs proporti… alternative alternat… two.sided #> 11 am proporti… N N 32 0 #> 12 am proporti… conf.level conf.lev… 0.95 1 #> 13 am proporti… estimate estimate 0.406 1 #> 14 am proporti… statistic statistic 1.125 1 #> 15 am proporti… p.value p.value 0.289 1 #> 16 am proporti… parameter parameter 1 0 #> 17 am proporti… conf.low conf.low 0.255 1 #> 18 am proporti… conf.high conf.high 0.577 1 #> 19 am proporti… method method Wilson C… #> 20 am proporti… alternative alternat… two.sided #> ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression.html","id":null,"dir":"Reference","previous_headings":"","what":"Regression ARD — ard_regression","title":"Regression ARD — ard_regression","text":"Function takes regression model object converts ARD structure using broom.helpers package.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Regression ARD — ard_regression","text":"","code":"ard_regression(x, ...) # S3 method for default ard_regression(x, tidy_fun = broom.helpers::tidy_with_broom_or_parameters, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Regression ARD — ard_regression","text":"x regression model object ... Arguments passed broom.helpers::tidy_plus_plus() tidy_fun (function) tidier. Default broom.helpers::tidy_with_broom_or_parameters","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Regression ARD — ard_regression","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Regression ARD — ard_regression","text":"","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_regression(add_estimate_to_reference_rows = TRUE) #> {cards} data frame: 43 x 7 #> variable variable_level context stat_name stat_label stat #> 1 ARM Placebo regressi… term term ARMPlace… #> 2 ARM Placebo regressi… var_label Label Descript… #> 3 ARM Placebo regressi… var_class Class character #> 4 ARM Placebo regressi… var_type Type categori… #> 5 ARM Placebo regressi… var_nlevels N Levels 3 #> 6 ARM Placebo regressi… contrasts contrasts contr.tr… #> 7 ARM Placebo regressi… contrasts_type Contrast… treatment #> 8 ARM Placebo regressi… reference_row referenc… TRUE #> 9 ARM Placebo regressi… label Level La… Placebo #> 10 ARM Placebo regressi… n_obs N Obs. 86 #> ℹ 33 more rows #> ℹ Use `print(n = ...)` to see more rows #> ℹ 1 more variable: fmt_fn"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression_basic.html","id":null,"dir":"Reference","previous_headings":"","what":"Basic Regression ARD — ard_regression_basic","title":"Basic Regression ARD — ard_regression_basic","text":"function takes regression model provides basic statistics ARD structure. default output simpler ard_regression(). function primarily matches regression terms underlying variable names levels. default arguments used ","code":"broom.helpers::tidy_plus_plus( add_reference_rows = FALSE, add_estimate_to_reference_rows = FALSE, add_n = FALSE, intercept = FALSE )"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression_basic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Basic Regression ARD — ard_regression_basic","text":"","code":"ard_regression_basic( x, tidy_fun = broom.helpers::tidy_with_broom_or_parameters, stats_to_remove = c(\"term\", \"var_type\", \"var_label\", \"var_class\", \"label\", \"contrasts_type\", \"contrasts\", \"var_nlevels\"), ... )"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression_basic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Basic Regression ARD — ard_regression_basic","text":"x regression model object tidy_fun (function) tidier. Default broom.helpers::tidy_with_broom_or_parameters stats_to_remove (character) character vector statistic names remove. Default c(\"term\", \"var_type\", \"var_label\", \"var_class\", \"label\", \"contrasts_type\", \"contrasts\", \"var_nlevels\"). ... Arguments passed broom.helpers::tidy_plus_plus()","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression_basic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Basic Regression ARD — ard_regression_basic","text":"data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_regression_basic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Basic Regression ARD — ard_regression_basic","text":"","code":"lm(AGE ~ ARM, data = cards::ADSL) |> ard_regression_basic() #> {cards} data frame: 12 x 7 #> variable variable_level context stat_name stat_label stat #> 1 ARM Xanomeli… regressi… estimate Coeffici… -0.828 #> 2 ARM Xanomeli… regressi… std.error Standard… 1.267 #> 3 ARM Xanomeli… regressi… statistic statistic -0.654 #> 4 ARM Xanomeli… regressi… p.value p-value 0.514 #> 5 ARM Xanomeli… regressi… conf.low CI Lower… -3.324 #> 6 ARM Xanomeli… regressi… conf.high CI Upper… 1.668 #> 7 ARM Xanomeli… regressi… estimate Coeffici… 0.457 #> 8 ARM Xanomeli… regressi… std.error Standard… 1.267 #> 9 ARM Xanomeli… regressi… statistic statistic 0.361 #> 10 ARM Xanomeli… regressi… p.value p-value 0.719 #> 11 ARM Xanomeli… regressi… conf.low CI Lower… -2.039 #> 12 ARM Xanomeli… regressi… conf.high CI Upper… 2.953 #> ℹ 1 more variable: fmt_fn"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_smd_smd.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Standardized Mean Difference — ard_smd_smd","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"Standardized mean difference calculated via smd::smd() na.rm = TRUE.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_smd_smd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"","code":"ard_smd_smd(data, by, variables, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_smd_smd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"data (data.frame/survey.design) data frame object class 'survey.design' (typically created survey::svydesign()). (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable. ... Arguments passed smd::smd std.error Logical indicator computing standard errors using compute_smd_var. Defaults FALSE. gref integer indicating level g use reference group. Defaults 1.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_smd_smd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_smd_smd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Standardized Mean Difference — ard_smd_smd","text":"","code":"ard_smd_smd(cards::ADSL, by = ARM, variables = AGE, std.error = TRUE) #> {cards} data frame: 3 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE smd_smd estimate Standard… 0.101, -0.055 #> 2 ARM AGE smd_smd std.error Standard… 0.154, 0.153 #> 3 ARM AGE smd_smd gref Integer … 1 #> ℹ 3 more variables: fmt_fn, warning, error ard_smd_smd(cards::ADSL, by = ARM, variables = AGEGR1, std.error = TRUE) #> {cards} data frame: 3 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGEGR1 smd_smd estimate Standard… 0.351, 0.214 #> 2 ARM AGEGR1 smd_smd std.error Standard… 0.155, 0.154 #> 3 ARM AGEGR1 smd_smd gref Integer … 1 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_anova.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD ANOVA — ard_stats_anova","title":"ARD ANOVA — ard_stats_anova","text":"Prepare ANOVA results stats::anova() function. Users may pass pre-calculated stats::anova() object list formulas. latter case, models constructed using information passed models passed stats::anova().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD ANOVA — ard_stats_anova","text":"","code":"ard_stats_anova(x, ...) # S3 method for anova ard_stats_anova(x, method_text = \"ANOVA results from `stats::anova()`\", ...) # S3 method for data.frame ard_stats_anova( x, formulas, method, method.args = list(), package = \"base\", method_text = \"ANOVA results from `stats::anova()`\", ... )"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD ANOVA — ard_stats_anova","text":"x (anova data.frame) object class 'anova' created stats::anova() data frame ... dots future extensions must empty. method_text (string) string method used. Default \"ANOVA results stats::anova()\". provide option change stats::anova() can produce results many types models may warrant precise description. formulas (list) list formulas method (string) string naming function called, e.g. \"glm\". function belongs library attached, package name must specified package argument. method.args (named list) named list arguments passed fn. package (string) string package name temporarily loaded function specified method executed.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD ANOVA — ard_stats_anova","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_anova.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD ANOVA — ard_stats_anova","text":"list formulas supplied ard_stats_anova(), formulas along information arguments, used construct models pass models stats::anova(). models constructed using rlang::exec(), similar .call(). function executed withr::with_namespace(package), allows use ard_stats_anova(method) packages, e.g. package = 'lme4' must specified method = 'glmer'. See example .","code":"rlang::exec(.fn = method, formula = formula, data = data, !!!method.args)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_anova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD ANOVA — ard_stats_anova","text":"","code":"anova( lm(mpg ~ am, mtcars), lm(mpg ~ am + hp, mtcars) ) |> ard_stats_anova() #> {cards} data frame: 11 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 model_1 stats_an… term term mpg ~ am NULL #> 2 model_1 stats_an… df.residual df for r… 30 1 #> 3 model_1 stats_an… rss Residual… 720.897 1 #> 4 model_2 stats_an… term term mpg ~ am… NULL #> 5 model_2 stats_an… df.residual df for r… 29 1 #> 6 model_2 stats_an… rss Residual… 245.439 1 #> 7 model_2 stats_an… df Degrees … 1 1 #> 8 model_2 stats_an… sumsq Sum of S… 475.457 1 #> 9 model_2 stats_an… statistic statistic 56.178 1 #> 10 model_2 stats_an… p.value p-value 0 1 #> 11 model_2 stats_an… method method ANOVA re… NULL #> ℹ 2 more variables: warning, error ard_stats_anova( x = mtcars, formulas = list(am ~ mpg, am ~ mpg + hp), method = \"glm\", method.args = list(family = binomial) ) #> {cards} data frame: 9 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 model_1 stats_an… term term am ~ mpg NULL #> 2 model_1 stats_an… df.residual df for r… 30 1 #> 3 model_1 stats_an… residual.deviance residual… 29.675 1 #> 4 model_2 stats_an… term term am ~ mpg… NULL #> 5 model_2 stats_an… df.residual df for r… 29 1 #> 6 model_2 stats_an… residual.deviance residual… 19.233 1 #> 7 model_2 stats_an… df Degrees … 1 1 #> 8 model_2 stats_an… deviance deviance 10.443 1 #> 9 model_2 stats_an… method method ANOVA re… NULL #> ℹ 2 more variables: warning, error ard_stats_anova( x = mtcars, formulas = list(am ~ 1 + (1 | vs), am ~ mpg + (1 | vs)), method = \"glmer\", method.args = list(family = binomial), package = \"lme4\" ) #> {cards} data frame: 16 x 8 #> variable context stat_name stat_label stat warning #> 1 model_1 stats_an… term term MODEL1 failed t… #> 2 model_1 stats_an… npar npar 2 failed t… #> 3 model_1 stats_an… AIC AIC 47.23 failed t… #> 4 model_1 stats_an… BIC BIC 50.161 failed t… #> 5 model_1 stats_an… logLik logLik -21.615 failed t… #> 6 model_1 stats_an… deviance deviance 43.23 failed t… #> 7 model_2 stats_an… term term MODEL2 failed t… #> 8 model_2 stats_an… npar npar 3 failed t… #> 9 model_2 stats_an… AIC AIC 35.25 failed t… #> 10 model_2 stats_an… BIC BIC 39.647 failed t… #> 11 model_2 stats_an… logLik logLik -14.625 failed t… #> 12 model_2 stats_an… deviance deviance 29.25 failed t… #> 13 model_2 stats_an… statistic statistic 13.979 failed t… #> 14 model_2 stats_an… df Degrees … 1 failed t… #> 15 model_2 stats_an… p.value p-value 0 failed t… #> 16 model_2 stats_an… method method ANOVA re… failed t… #> ℹ 2 more variables: fmt_fn, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_aov.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD ANOVA — ard_stats_aov","title":"ARD ANOVA — ard_stats_aov","text":"Analysis results data Analysis Variance. Calculated stats::aov()","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_aov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD ANOVA — ard_stats_aov","text":"","code":"ard_stats_aov(formula, data, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_aov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD ANOVA — ard_stats_aov","text":"formula formula specifying model. data data frame variables specified formula found. missing, variables searched standard way. ... arguments passed stats::aov(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_aov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD ANOVA — ard_stats_aov","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_aov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD ANOVA — ard_stats_aov","text":"","code":"ard_stats_aov(AGE ~ ARM, data = cards::ADSL) #> {cards} data frame: 5 x 7 #> variable context stat_name stat_label stat error #> 1 ARM stats_aov sumsq Sum of S… 71.386 #> 2 ARM stats_aov df Degrees … 2 #> 3 ARM stats_aov meansq Mean of … 35.693 #> 4 ARM stats_aov statistic Statistic 0.523 #> 5 ARM stats_aov p.value p-value 0.593 #> ℹ 1 more variable: warning"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_chisq_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Chi-squared Test — ard_stats_chisq_test","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"Analysis results data Pearson's Chi-squared Test. Calculated chisq.test(x = data[[variable]], y = data[[]], ...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_chisq_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"","code":"ard_stats_chisq_test(data, by, variables, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_chisq_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"data (data.frame) data frame. (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable. ... additional arguments passed chisq.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_chisq_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_chisq_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Chi-squared Test — ard_stats_chisq_test","text":"","code":"cards::ADSL |> ard_stats_chisq_test(by = \"ARM\", variables = \"AGEGR1\") #> {cards} data frame: 9 x 9 #> group1 variable context stat_name stat_label #> 1 ARM AGEGR1 stats_ch… statistic X-square… #> 2 ARM AGEGR1 stats_ch… p.value p-value #> 3 ARM AGEGR1 stats_ch… parameter Degrees … #> 4 ARM AGEGR1 stats_ch… method method #> 5 ARM AGEGR1 stats_ch… correct correct #> 6 ARM AGEGR1 stats_ch… p p #> 7 ARM AGEGR1 stats_ch… rescale.p rescale.p #> 8 ARM AGEGR1 stats_ch… simulate.p.value simulate… #> 9 ARM AGEGR1 stats_ch… B B #> stat #> 1 6.852 #> 2 0.144 #> 3 4 #> 4 Pearson'… #> 5 TRUE #> 6 rep, 1/length(x), length(x) #> 7 FALSE #> 8 FALSE #> 9 2000 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_fisher_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Fisher's Exact Test — ard_stats_fisher_test","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"Analysis results data Fisher's Exact Test. Calculated fisher.test(x = data[[variable]], y = data[[]], ...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_fisher_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"","code":"ard_stats_fisher_test(data, by, variables, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_fisher_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"data (data.frame) data frame. (tidy-select) column name compare variables (tidy-select) column names compared. Independent tests computed variable. conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... additional arguments passed fisher.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_fisher_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_fisher_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Fisher's Exact Test — ard_stats_fisher_test","text":"","code":"cards::ADSL[1:30, ] |> ard_stats_fisher_test(by = \"ARM\", variables = \"AGEGR1\") #> {cards} data frame: 12 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGEGR1 stats_fi… p.value p-value 0.089 #> 2 ARM AGEGR1 stats_fi… method method Fisher's… #> 3 ARM AGEGR1 stats_fi… alternative alternat… two.sided #> 4 ARM AGEGR1 stats_fi… workspace workspace 2e+05 #> 5 ARM AGEGR1 stats_fi… hybrid hybrid FALSE #> 6 ARM AGEGR1 stats_fi… hybridPars hybridPa… c, 5, 80, 1 #> 7 ARM AGEGR1 stats_fi… control control list #> 8 ARM AGEGR1 stats_fi… or or 1 #> 9 ARM AGEGR1 stats_fi… conf.int conf.int TRUE #> 10 ARM AGEGR1 stats_fi… conf.level conf.lev… 0.95 #> 11 ARM AGEGR1 stats_fi… simulate.p.value simulate… FALSE #> 12 ARM AGEGR1 stats_fi… B B 2000 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_kruskal_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"Analysis results data Kruskal-Wallis Rank Sum Test. Calculated kruskal.test(data[[variable]], data[[]], ...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_kruskal_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"","code":"ard_stats_kruskal_test(data, by, variables)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_kruskal_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"data (data.frame) data frame. (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_kruskal_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_kruskal_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Kruskal-Wallis Test — ard_stats_kruskal_test","text":"","code":"cards::ADSL |> ard_stats_kruskal_test(by = \"ARM\", variables = \"AGE\") #> {cards} data frame: 4 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_kr… statistic Kruskal-… 1.635 #> 2 ARM AGE stats_kr… p.value p-value 0.442 #> 3 ARM AGE stats_kr… parameter Degrees … 2 #> 4 ARM AGE stats_kr… method method Kruskal-… #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mcnemar_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD McNemar's Test — ard_stats_mcnemar_test","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"Analysis results data McNemar's statistical test. two functions depending structure data. ard_stats_mcnemar_test() structure expected stats::mcnemar.test() ard_stats_mcnemar_test_long() one row per ID per group","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mcnemar_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"","code":"ard_stats_mcnemar_test(data, by, variables, ...) ard_stats_mcnemar_test_long(data, by, variables, id, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mcnemar_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"data (data.frame) data frame. See details. (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable. ... arguments passed stats::mcnemar.test(...) id (tidy-select) column name subject participant ID","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mcnemar_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mcnemar_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"ard_stats_mcnemar_test() function, data expected one row per subject. data passed stats::mcnemar.test(x = data[[variable]], y = data[[]], ...). Please use table(x = data[[variable]], y = data[[]]) check contingency table.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mcnemar_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD McNemar's Test — ard_stats_mcnemar_test","text":"","code":"cards::ADSL |> ard_stats_mcnemar_test(by = \"SEX\", variables = \"EFFFL\") #> {cards} data frame: 5 x 9 #> group1 variable context stat_name stat_label stat #> 1 SEX EFFFL stats_mc… statistic X-square… 111.91 #> 2 SEX EFFFL stats_mc… p.value p-value 0 #> 3 SEX EFFFL stats_mc… parameter Degrees … 1 #> 4 SEX EFFFL stats_mc… method method McNemar'… #> 5 SEX EFFFL stats_mc… correct correct TRUE #> ℹ 3 more variables: fmt_fn, warning, error set.seed(1234) cards::ADSL[c(\"USUBJID\", \"TRT01P\")] |> dplyr::mutate(TYPE = \"PLANNED\") |> dplyr::rename(TRT01 = TRT01P) %>% dplyr::bind_rows(dplyr::mutate(., TYPE = \"ACTUAL\", TRT01 = sample(TRT01))) |> ard_stats_mcnemar_test_long( by = TYPE, variable = TRT01, id = USUBJID ) #> {cards} data frame: 5 x 9 #> group1 variable context stat_name stat_label stat #> 1 TYPE TRT01 stats_mc… statistic X-square… 1.353 #> 2 TYPE TRT01 stats_mc… p.value p-value 0.717 #> 3 TYPE TRT01 stats_mc… parameter Degrees … 3 #> 4 TYPE TRT01 stats_mc… method method McNemar'… #> 5 TYPE TRT01 stats_mc… correct correct TRUE #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mood_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Mood Test — ard_stats_mood_test","title":"ARD Mood Test — ard_stats_mood_test","text":"Analysis results data Mood two sample test scale. Note confused Brown-Mood test medians.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mood_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Mood Test — ard_stats_mood_test","text":"","code":"ard_stats_mood_test(data, by, variables, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mood_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Mood Test — ard_stats_mood_test","text":"data (data.frame) data frame. See details. (tidy-select) column name compare . variables (tidy-select) column name compared. Independent tests run variable. ... arguments passed mood.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mood_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Mood Test — ard_stats_mood_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mood_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Mood Test — ard_stats_mood_test","text":"ard_stats_mood_test() function, data expected one row per subject. data passed mood.test(data[[variable]] ~ data[[]], ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_mood_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Mood Test — ard_stats_mood_test","text":"","code":"cards::ADSL |> ard_stats_mood_test(by = \"SEX\", variables = \"AGE\") #> {cards} data frame: 4 x 9 #> group1 variable context stat_name stat_label stat #> 1 SEX AGE stats_mo… statistic Z-Statis… 0.129 #> 2 SEX AGE stats_mo… p.value p-value 0.897 #> 3 SEX AGE stats_mo… method method Mood two… #> 4 SEX AGE stats_mo… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_oneway_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD One-way Test — ard_stats_oneway_test","title":"ARD One-way Test — ard_stats_oneway_test","text":"Analysis results data Testing Equal Means One-Way Layout. calculated oneway.test()","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_oneway_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD One-way Test — ard_stats_oneway_test","text":"","code":"ard_stats_oneway_test(formula, data, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_oneway_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD One-way Test — ard_stats_oneway_test","text":"formula formula form lhs ~ rhs lhs gives sample values rhs corresponding groups. data optional matrix data frame (similar: see model.frame) containing variables formula formula. default variables taken environment(formula). ... additional arguments passed oneway.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_oneway_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD One-way Test — ard_stats_oneway_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_oneway_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD One-way Test — ard_stats_oneway_test","text":"","code":"ard_stats_oneway_test(AGE ~ ARM, data = cards::ADSL) #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_on… num.df Degrees … 2 #> 2 ARM AGE stats_on… den.df Denomina… 167.237 #> 3 ARM AGE stats_on… statistic F Statis… 0.547 #> 4 ARM AGE stats_on… p.value p-value 0.58 #> 5 ARM AGE stats_on… method Method One-way … #> 6 ARM AGE stats_on… var.equal var.equal FALSE #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_prop_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD 2-sample proportion test — ard_stats_prop_test","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"Analysis results data 2-sample test proportions using stats::prop.test().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_prop_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"","code":"ard_stats_prop_test(data, by, variables, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_prop_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"data (data.frame) data frame. (tidy-select) column name compare variables (tidy-select) column names compared. Must binary column coded TRUE/FALSE 1/0. Independent tests computed variable. conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed prop.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_prop_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_prop_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD 2-sample proportion test — ard_stats_prop_test","text":"","code":"mtcars |> ard_stats_prop_test(by = vs, variables = am) #> {cards} data frame: 13 x 9 #> group1 variable context stat_name stat_label stat #> 1 vs am stats_pr… estimate Rate Dif… -0.167 #> 2 vs am stats_pr… estimate1 Group 1 … 0.333 #> 3 vs am stats_pr… estimate2 Group 2 … 0.5 #> 4 vs am stats_pr… statistic X-square… 0.348 #> 5 vs am stats_pr… p.value p-value 0.556 #> 6 vs am stats_pr… parameter Degrees … 1 #> 7 vs am stats_pr… conf.low CI Lower… -0.571 #> 8 vs am stats_pr… conf.high CI Upper… 0.237 #> 9 vs am stats_pr… method method 2-sample… #> 10 vs am stats_pr… alternative alternat… two.sided #> 11 vs am stats_pr… p p #> 12 vs am stats_pr… conf.level CI Confi… 0.95 #> 13 vs am stats_pr… correct Yates' c… TRUE #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_t_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD t-test — ard_stats_t_test","title":"ARD t-test — ard_stats_t_test","text":"Analysis results data paired non-paired t-tests.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_t_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD t-test — ard_stats_t_test","text":"","code":"ard_stats_t_test(data, variables, by = NULL, conf.level = 0.95, ...) ard_stats_paired_t_test(data, by, variables, id, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_t_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD t-test — ard_stats_t_test","text":"data (data.frame) data frame. See details. variables (tidy-select) column names compared. Independent t-tests computed variable. (tidy-select) optional column name compare . conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed t.test(...) id (tidy-select) column name subject participant ID","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_t_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD t-test — ard_stats_t_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_t_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD t-test — ard_stats_t_test","text":"ard_stats_t_test() function, data expected one row per subject. data passed t.test(data[[variable]] ~ data[[]], paired = FALSE, ...). ard_stats_paired_t_test() function, data expected one row per subject per level. t-test calculated, data reshaped wide format one row per subject. data passed t.test(x = data_wide[[]], y = data_wide[[]], paired = TRUE, ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_t_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD t-test — ard_stats_t_test","text":"","code":"cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_stats_t_test(by = ARM, variables = c(AGE, BMIBL)) #> {cards} data frame: 28 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_t_… estimate Mean Dif… 0.828 #> 2 ARM AGE stats_t_… estimate1 Group 1 … 75.209 #> 3 ARM AGE stats_t_… estimate2 Group 2 … 74.381 #> 4 ARM AGE stats_t_… statistic t Statis… 0.655 #> 5 ARM AGE stats_t_… p.value p-value 0.513 #> 6 ARM AGE stats_t_… parameter Degrees … 167.362 #> 7 ARM AGE stats_t_… conf.low CI Lower… -1.668 #> 8 ARM AGE stats_t_… conf.high CI Upper… 3.324 #> 9 ARM AGE stats_t_… method method Welch Tw… #> 10 ARM AGE stats_t_… alternative alternat… two.sided #> ℹ 18 more rows #> ℹ Use `print(n = ...)` to see more rows #> ℹ 3 more variables: fmt_fn, warning, error # constructing a paired data set, # where patients receive both treatments cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> ard_stats_paired_t_test(by = ARM, variables = AGE, id = USUBJID) #> {cards} data frame: 12 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_t_… estimate Mean Dif… 0.798 #> 2 ARM AGE stats_t_… statistic t Statis… 0.628 #> 3 ARM AGE stats_t_… p.value p-value 0.531 #> 4 ARM AGE stats_t_… parameter Degrees … 83 #> 5 ARM AGE stats_t_… conf.low CI Lower… -1.727 #> 6 ARM AGE stats_t_… conf.high CI Upper… 3.322 #> 7 ARM AGE stats_t_… method method Paired t… #> 8 ARM AGE stats_t_… alternative alternat… two.sided #> 9 ARM AGE stats_t_… mu H0 Mean 0 #> 10 ARM AGE stats_t_… paired Paired t… TRUE #> 11 ARM AGE stats_t_… var.equal Equal Va… FALSE #> 12 ARM AGE stats_t_… conf.level CI Confi… 0.95 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_wilcox_test.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"Analysis results data paired non-paired Wilcoxon Rank-Sum tests.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_wilcox_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"","code":"ard_stats_wilcox_test(data, variables, by = NULL, conf.level = 0.95, ...) ard_stats_paired_wilcox_test(data, by, variables, id, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_wilcox_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"data (data.frame) data frame. See details. variables (tidy-select) column names compared. Independent tests computed variable. (tidy-select) optional column name compare . conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed wilcox.test(...) id (tidy-select) column name subject participant ID.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_wilcox_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_wilcox_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"ard_stats_wilcox_test() function, data expected one row per subject. data passed wilcox.test(data[[variable]] ~ data[[]], paired = FALSE, ...). ard_stats_paired_wilcox_test() function, data expected one row per subject per level. test calculated, data reshaped wide format one row per subject. data passed wilcox.test(x = data_wide[[]], y = data_wide[[]], paired = TRUE, ...).","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_stats_wilcox_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Wilcoxon Rank-Sum Test — ard_stats_wilcox_test","text":"","code":"cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_stats_wilcox_test(by = \"ARM\", variables = \"AGE\") #> {cards} data frame: 12 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_wi… statistic X-square… 3862.5 #> 2 ARM AGE stats_wi… p.value p-value 0.435 #> 3 ARM AGE stats_wi… method method Wilcoxon… #> 4 ARM AGE stats_wi… alternative alternat… two.sided #> 5 ARM AGE stats_wi… mu mu 0 #> 6 ARM AGE stats_wi… paired Paired t… FALSE #> 7 ARM AGE stats_wi… exact exact #> 8 ARM AGE stats_wi… correct correct TRUE #> 9 ARM AGE stats_wi… conf.int conf.int FALSE #> 10 ARM AGE stats_wi… conf.level CI Confi… 0.95 #> 11 ARM AGE stats_wi… tol.root tol.root 0 #> 12 ARM AGE stats_wi… digits.rank digits.r… Inf #> ℹ 3 more variables: fmt_fn, warning, error # constructing a paired data set, # where patients receive both treatments cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> ard_stats_paired_wilcox_test(by = ARM, variables = AGE, id = USUBJID) #> {cards} data frame: 12 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_wi… statistic X-square… 1754 #> 2 ARM AGE stats_wi… p.value p-value 0.522 #> 3 ARM AGE stats_wi… method method Wilcoxon… #> 4 ARM AGE stats_wi… alternative alternat… two.sided #> 5 ARM AGE stats_wi… mu mu 0 #> 6 ARM AGE stats_wi… paired Paired t… TRUE #> 7 ARM AGE stats_wi… exact exact #> 8 ARM AGE stats_wi… correct correct TRUE #> 9 ARM AGE stats_wi… conf.int conf.int FALSE #> 10 ARM AGE stats_wi… conf.level CI Confi… 0.95 #> 11 ARM AGE stats_wi… tol.root tol.root 0 #> 12 ARM AGE stats_wi… digits.rank digits.r… Inf #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svychisq.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Survey Chi-Square Test — ard_survey_svychisq","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"Analysis results data survey Chi-Square test using survey::svychisq(). two-way comparisons supported.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svychisq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"","code":"ard_survey_svychisq(data, by, variables, statistic = \"F\", ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svychisq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"data (survey.design) survey design object often created {survey} package (tidy-select) column name compare . variables (tidy-select) column names compared. Independent tests computed variable. statistic (character) statistic used estimate Chisq p-value. Default Rao-Scott second-order correction (\"F\"). See survey::svychisq available statistics options. ... arguments passed survey::svychisq().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svychisq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svychisq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Survey Chi-Square Test — ard_survey_svychisq","text":"","code":"data(api, package = \"survey\") dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) ard_survey_svychisq(dclus1, variables = sch.wide, by = comp.imp, statistic = \"F\") #> {cards} data frame: 5 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp sch.wide survey_s… ndf Nominato… 1 #> 2 comp.imp sch.wide survey_s… ddf Denomina… 14 #> 3 comp.imp sch.wide survey_s… statistic Statistic 236.895 #> 4 comp.imp sch.wide survey_s… p.value p-value 0 #> 5 comp.imp sch.wide survey_s… method method Pearson'… #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svycontinuous.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"Returns ARD weighted statistics using {survey} package.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svycontinuous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"","code":"ard_survey_svycontinuous( data, variables, by = NULL, statistic = everything() ~ c(\"median\", \"p25\", \"p75\"), fmt_fn = NULL, stat_label = NULL )"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svycontinuous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"data (survey.design) design object often created survey::svydesign(). variables (tidy-select) columns include summaries. Default everything(). (tidy-select) results calculated combinations columns specified, including unobserved combinations unobserved factor levels. statistic (formula-list-selector) named list, list formulas, single formula list element character vector statistic names include. See options. fmt_fn (formula-list-selector) named list, list formulas, single formula list element named list functions (RHS formula), e.g. list(mpg = list(mean = \\(x) round(x, digits = 2) |> .character)). stat_label (formula-list-selector) named list, list formulas, single formula list element either named list list formulas defining statistic labels, e.g. everything() ~ list(mean = \"Mean\", sd = \"SD\") everything() ~ list(mean ~ \"Mean\", sd ~ \"SD\").","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svycontinuous.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svycontinuous.html","id":"statistic-argument","dir":"Reference","previous_headings":"","what":"statistic argument","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"following statistics available: 'mean', 'median', 'min', 'max', 'sum', 'var', 'sd', 'mean.std.error', 'deff', 'p##', 'p##' percentiles ## integer 0 100.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svycontinuous.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Continuous Survey Statistics — ard_survey_svycontinuous","text":"","code":"data(api, package = \"survey\") dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) ard_survey_svycontinuous( data = dclus1, variables = api00, by = stype ) #> {cards} data frame: 9 x 10 #> group1 group1_level variable stat_name stat_label stat #> 1 stype E api00 median Median 652 #> 2 stype H api00 median Median 608 #> 3 stype M api00 median Median 642 #> 4 stype E api00 p25 25% Perc… 553 #> 5 stype H api00 p25 25% Perc… 529 #> 6 stype M api00 p25 25% Perc… 547 #> 7 stype E api00 p75 75% Perc… 729 #> 8 stype H api00 p75 75% Perc… 703 #> 9 stype M api00 p75 75% Perc… 699 #> ℹ 4 more variables: context, fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyranktest.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Survey rank test — ard_survey_svyranktest","title":"ARD Survey rank test — ard_survey_svyranktest","text":"Analysis results data survey wilcox test using survey::svyranktest().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyranktest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Survey rank test — ard_survey_svyranktest","text":"","code":"ard_survey_svyranktest(data, by, variables, test, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyranktest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Survey rank test — ard_survey_svyranktest","text":"data (survey.design) survey design object often created survey::svydesign() (tidy-select) column name compare variables (tidy-select) column names compared. Independent tests run variable. test (string) string denote rank test use: \"wilcoxon\", \"vanderWaerden\", \"median\", \"KruskalWallis\" ... arguments passed survey::svyranktest()","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyranktest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Survey rank test — ard_survey_svyranktest","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyranktest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Survey rank test — ard_survey_svyranktest","text":"","code":"data(api, package = \"survey\") dclus2 <- survey::svydesign(id = ~ dnum + snum, fpc = ~ fpc1 + fpc2, data = apiclus2) ard_survey_svyranktest(dclus2, variables = enroll, by = comp.imp, test = \"wilcoxon\") #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Median o… -0.106 #> 2 comp.imp enroll survey_s… statistic Statistic -1.719 #> 3 comp.imp enroll survey_s… p.value p-value 0.094 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error ard_survey_svyranktest(dclus2, variables = enroll, by = comp.imp, test = \"vanderWaerden\") #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Median o… -0.379 #> 2 comp.imp enroll survey_s… statistic Statistic -1.584 #> 3 comp.imp enroll survey_s… p.value p-value 0.122 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error ard_survey_svyranktest(dclus2, variables = enroll, by = comp.imp, test = \"median\") #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Median o… -0.124 #> 2 comp.imp enroll survey_s… statistic Statistic -0.914 #> 3 comp.imp enroll survey_s… p.value p-value 0.367 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error ard_survey_svyranktest(dclus2, variables = enroll, by = comp.imp, test = \"KruskalWallis\") #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Median o… -0.106 #> 2 comp.imp enroll survey_s… statistic Statistic -1.719 #> 3 comp.imp enroll survey_s… p.value p-value 0.094 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative Alternat… two.sided #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyttest.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Survey t-test — ard_survey_svyttest","title":"ARD Survey t-test — ard_survey_svyttest","text":"Analysis results data survey t-test using survey::svyttest().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyttest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Survey t-test — ard_survey_svyttest","text":"","code":"ard_survey_svyttest(data, by, variables, conf.level = 0.95, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyttest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Survey t-test — ard_survey_svyttest","text":"data (survey.design) survey design object often created survey::svydesign() (tidy-select) column name compare variables (tidy-select) column names compared. Independent tests run variable. conf.level (double) confidence level returned confidence interval. Must c(0, 1). Default 0.95 ... arguments passed survey::svyttest()","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyttest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Survey t-test — ard_survey_svyttest","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survey_svyttest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Survey t-test — ard_survey_svyttest","text":"","code":"data(api, package = \"survey\") dclus2 <- survey::svydesign(id = ~ dnum + snum, fpc = ~ fpc1 + fpc2, data = apiclus2) ard_survey_svyttest(dclus2, variables = enroll, by = comp.imp, conf.level = 0.9) #> {cards} data frame: 9 x 9 #> group1 variable context stat_name stat_label stat #> 1 comp.imp enroll survey_s… estimate Mean -225.737 #> 2 comp.imp enroll survey_s… statistic t Statis… -2.888 #> 3 comp.imp enroll survey_s… p.value p-value 0.007 #> 4 comp.imp enroll survey_s… parameter Degrees … 36 #> 5 comp.imp enroll survey_s… method method Design-b… #> 6 comp.imp enroll survey_s… alternative alternat… two.sided #> 7 comp.imp enroll survey_s… conf.low CI Lower… -357.69 #> 8 comp.imp enroll survey_s… conf.high CI Upper… -93.784 #> 9 comp.imp enroll survey_s… conf.level CI Confi… 0.9 #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survdiff.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD for Difference in Survival — ard_survival_survdiff","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"Analysis results data comparison survival using survival::survdiff().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survdiff.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"","code":"ard_survival_survdiff(formula, data, rho = 0, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survdiff.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"formula (formula) formula data (data.frame) data frame rho (scalar numeric) numeric scalar passed survival::survdiff(rho). Default rho=0. ... additional arguments passed survival::survdiff()","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survdiff.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survdiff.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD for Difference in Survival — ard_survival_survdiff","text":"","code":"library(survival) library(ggsurvfit) #> Loading required package: ggplot2 ard_survival_survdiff(Surv_CNSR(AVAL, CNSR) ~ TRTA, data = cards::ADTTE) #> {cards} data frame: 4 x 8 #> variable context stat_name stat_label stat fmt_fn #> 1 TRTA survival… statistic X^2 Stat… 60.27 1 #> 2 TRTA survival… df Degrees … 2 1 #> 3 TRTA survival… p.value p-value 0 1 #> 4 TRTA survival… method method Log-rank… NULL #> ℹ 2 more variables: warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survfit.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Survival Estimates — ard_survival_survfit","title":"ARD Survival Estimates — ard_survival_survfit","text":"Analysis results data survival quantiles x-year survival estimates, extracted survival::survfit() model.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Survival Estimates — ard_survival_survfit","text":"","code":"ard_survival_survfit(x, times = NULL, probs = NULL, type = NULL)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Survival Estimates — ard_survival_survfit","text":"x (survival::survfit()) survival::survfit() object. See details. times (numeric) vector times return survival probabilities. probs (numeric) vector probabilities values (0,1) specifying survival quantiles return. type (string NULL) type statistic report. Available Kaplan-Meier time estimates , otherwise type ignored. Default NULL. Must one following:","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Survival Estimates — ard_survival_survfit","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"ARD Survival Estimates — ard_survival_survfit","text":"one either times probs parameters can specified. Times provided using scale time variable used fit provided survival fit model.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_survival_survfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Survival Estimates — ard_survival_survfit","text":"","code":"library(survival) library(ggsurvfit) survfit(Surv_CNSR(AVAL, CNSR) ~ TRTA, cards::ADTTE) |> ard_survival_survfit(times = c(60, 180)) #> {cards} data frame: 18 x 11 #> group1 group1_level variable variable_level stat_name stat_label stat #> 1 TRTA Placebo time 60 estimate Survival… 0.768 #> 2 TRTA Placebo time 60 conf.high CI Upper… 0.866 #> 3 TRTA Placebo time 60 conf.low CI Lower… 0.682 #> 4 TRTA Placebo time 180 estimate Survival… 0.626 #> 5 TRTA Placebo time 180 conf.high CI Upper… 0.746 #> 6 TRTA Placebo time 180 conf.low CI Lower… 0.526 #> 7 TRTA Xanomeli… time 60 estimate Survival… 0.243 #> 8 TRTA Xanomeli… time 60 conf.high CI Upper… 0.373 #> 9 TRTA Xanomeli… time 60 conf.low CI Lower… 0.158 #> 10 TRTA Xanomeli… time 180 estimate Survival… 0.092 #> 11 TRTA Xanomeli… time 180 conf.high CI Upper… 0.221 #> 12 TRTA Xanomeli… time 180 conf.low CI Lower… 0.038 #> 13 TRTA Xanomeli… time 60 estimate Survival… 0.311 #> 14 TRTA Xanomeli… time 60 conf.high CI Upper… 0.441 #> 15 TRTA Xanomeli… time 60 conf.low CI Lower… 0.219 #> 16 TRTA Xanomeli… time 180 estimate Survival… 0.126 #> 17 TRTA Xanomeli… time 180 conf.high CI Upper… 0.249 #> 18 TRTA Xanomeli… time 180 conf.low CI Lower… 0.064 #> ℹ 4 more variables: context, fmt_fn, warning, error survfit(Surv_CNSR(AVAL, CNSR) ~ TRTA, cards::ADTTE) |> ard_survival_survfit(probs = c(0.25, 0.5, 0.75)) #> {cards} data frame: 27 x 11 #> group1 group1_level variable variable_level stat_name stat_label stat #> 1 TRTA Placebo prob 0.25 estimate Survival… 70 #> 2 TRTA Placebo prob 0.25 conf.high CI Upper… 177 #> 3 TRTA Placebo prob 0.25 conf.low CI Lower… 35 #> 4 TRTA Placebo prob 0.5 estimate Survival… NA #> 5 TRTA Placebo prob 0.5 conf.high CI Upper… NA #> 6 TRTA Placebo prob 0.5 conf.low CI Lower… NA #> 7 TRTA Placebo prob 0.75 estimate Survival… NA #> 8 TRTA Placebo prob 0.75 conf.high CI Upper… NA #> 9 TRTA Placebo prob 0.75 conf.low CI Lower… NA #> 10 TRTA Xanomeli… prob 0.25 estimate Survival… 14 #> ℹ 17 more rows #> ℹ Use `print(n = ...)` to see more rows #> ℹ 4 more variables: context, fmt_fn, warning, error # Competing Risks Example --------------------------- set.seed(1) ADTTE_MS <- cards::ADTTE %>% dplyr::mutate( CNSR = dplyr::case_when( CNSR == 0 ~ \"censor\", runif(dplyr::n()) < 0.5 ~ \"death from cancer\", TRUE ~ \"death other causes\" ) %>% factor() ) survfit(Surv(AVAL, CNSR) ~ TRTA, data = ADTTE_MS) %>% ard_survival_survfit(times = c(60, 180)) #> Multi-state model detected. Showing probabilities into state 'death from #> cancer'. #> {cards} data frame: 18 x 11 #> group1 group1_level variable variable_level stat_name stat_label stat #> 1 TRTA Placebo time 60 estimate Survival… 0.054 #> 2 TRTA Placebo time 60 conf.high CI Upper… 0.14 #> 3 TRTA Placebo time 60 conf.low CI Lower… 0.021 #> 4 TRTA Placebo time 180 estimate Survival… 0.226 #> 5 TRTA Placebo time 180 conf.high CI Upper… 0.361 #> 6 TRTA Placebo time 180 conf.low CI Lower… 0.142 #> 7 TRTA Xanomeli… time 60 estimate Survival… 0.137 #> 8 TRTA Xanomeli… time 60 conf.high CI Upper… 0.311 #> 9 TRTA Xanomeli… time 60 conf.low CI Lower… 0.06 #> 10 TRTA Xanomeli… time 180 estimate Survival… 0.51 #> 11 TRTA Xanomeli… time 180 conf.high CI Upper… 0.892 #> 12 TRTA Xanomeli… time 180 conf.low CI Lower… 0.292 #> 13 TRTA Xanomeli… time 60 estimate Survival… 0.162 #> 14 TRTA Xanomeli… time 60 conf.high CI Upper… 0.33 #> 15 TRTA Xanomeli… time 60 conf.low CI Lower… 0.08 #> 16 TRTA Xanomeli… time 180 estimate Survival… 0.244 #> 17 TRTA Xanomeli… time 180 conf.high CI Upper… 0.516 #> 18 TRTA Xanomeli… time 180 conf.low CI Lower… 0.115 #> ℹ 4 more variables: context, fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/cardx-package.html","id":null,"dir":"Reference","previous_headings":"","what":"cardx: Extra Analysis Results Data Utilities — cardx-package","title":"cardx: Extra Analysis Results Data Utilities — cardx-package","text":"Create extra Analysis Results Data (ARD) summary objects. package supplements simple ARD functions 'cards' package, exporting functions put statistical results ARD format. objects used re-used construct summary tables, visualizations, written reports.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/main/reference/cardx-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"cardx: Extra Analysis Results Data Utilities — cardx-package","text":"Maintainer: Daniel Sjoberg danield.sjoberg@gmail.com Authors: Abinaya Yogasekaram abinaya.yogasekaram@contractors.roche.com Emily de la Rua emily.de_la_rua@contractors.roche.com contributors: F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/construction_helpers.html","id":null,"dir":"Reference","previous_headings":"","what":"Construction Helpers — construction_helpers","title":"Construction Helpers — construction_helpers","text":"functions help construct calls various types models.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/construction_helpers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construction Helpers — construction_helpers","text":"","code":"construct_model(x, ...) # S3 method for data.frame construct_model( x, formula, method, method.args = list(), package = \"base\", env = caller_env(), ... ) # S3 method for survey.design construct_model( x, formula, method, method.args = list(), package = \"survey\", env = caller_env(), ... ) reformulate2( termlabels, response = NULL, intercept = TRUE, pattern_term = \"[ \\n\\r]\", pattern_response = \"[ \\n\\r]\", env = parent.frame() ) bt(x, pattern = \"[ \\n\\r]\") bt_strip(x)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/construction_helpers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construction Helpers — construction_helpers","text":"x construct_model.data.frame() (data.frame) data frame construct_model.survey.design() (survey.design) survey design object bt()/bt_strip() (character) character vector, typically variable names ... dots future extensions must empty. formula (formula) formula method (string) string naming function called, e.g. \"glm\". function belongs library attached, package name must specified package argument. method.args (named list) named list arguments passed fn. package (string) string package name temporarily loaded function specified method executed. env environment evaluate expr. environment applicable quosures environments. termlabels character vector giving right-hand side model formula. zero-length. response character string, symbol call giving left-hand side model formula, NULL. intercept logical: formula intercept? pattern_term, pattern_response passed bt(pattern) arguments stats::reformulate(termlabels, response). pattern (string) regular expression string. regex matches, backticks added string. NULL, backticks added.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/construction_helpers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construction Helpers — construction_helpers","text":"depends calling function","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/construction_helpers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Construction Helpers — construction_helpers","text":"construct_model(): Builds models form method(data = data, formula = formula, method.args!!!). package argument specified, package temporarily attached model evaluated. reformulate2(): copy reformulate() except variable names contain space wrapped backticks. bt(): Adds backticks character vector. bt_strip(): Removes backticks string begins ends backtick.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/construction_helpers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Construction Helpers — construction_helpers","text":"","code":"construct_model( x = mtcars, formula = am ~ mpg + (1 | vs), method = \"glmer\", method.args = list(family = binomial), package = \"lme4\" ) #> Generalized linear mixed model fit by maximum likelihood (Laplace #> Approximation) [glmerMod] #> Family: binomial ( logit ) #> Formula: am ~ mpg + (1 | vs) #> Data: structure(list(mpg = c(21, 21, 22.8, 21.4, 18.7, 18.1, 14.3, #> 24.4, 22.8, 19.2, 17.8, 16.4, 17.3, 15.2, 10.4, 10.4, 14.7, 32.4, #> 30.4, 33.9, 21.5, 15.5, 15.2, 13.3, 19.2, 27.3, 26, 30.4, 15.8, #> 19.7, 15, 21.4), cyl = c(6, 6, 4, 6, 8, 6, 8, 4, 4, 6, 6, 8, #> 8, 8, 8, 8, 8, 4, 4, 4, 4, 8, 8, 8, 8, 4, 4, 4, 8, 6, 8, 4), #> disp = c(160, 160, 108, 258, 360, 225, 360, 146.7, 140.8, #> 167.6, 167.6, 275.8, 275.8, 275.8, 472, 460, 440, 78.7, 75.7, #> 71.1, 120.1, 318, 304, 350, 400, 79, 120.3, 95.1, 351, 145, #> 301, 121), hp = c(110, 110, 93, 110, 175, 105, 245, 62, 95, #> 123, 123, 180, 180, 180, 205, 215, 230, 66, 52, 65, 97, 150, #> 150, 245, 175, 66, 91, 113, 264, 175, 335, 109), drat = c(3.9, #> 3.9, 3.85, 3.08, 3.15, 2.76, 3.21, 3.69, 3.92, 3.92, 3.92, #> 3.07, 3.07, 3.07, 2.93, 3, 3.23, 4.08, 4.93, 4.22, 3.7, 2.76, #> 3.15, 3.73, 3.08, 4.08, 4.43, 3.77, 4.22, 3.62, 3.54, 4.11 #> ), wt = c(2.62, 2.875, 2.32, 3.215, 3.44, 3.46, 3.57, 3.19, #> 3.15, 3.44, 3.44, 4.07, 3.73, 3.78, 5.25, 5.424, 5.345, 2.2, #> 1.615, 1.835, 2.465, 3.52, 3.435, 3.84, 3.845, 1.935, 2.14, #> 1.513, 3.17, 2.77, 3.57, 2.78), qsec = c(16.46, 17.02, 18.61, #> 19.44, 17.02, 20.22, 15.84, 20, 22.9, 18.3, 18.9, 17.4, 17.6, #> 18, 17.98, 17.82, 17.42, 19.47, 18.52, 19.9, 20.01, 16.87, #> 17.3, 15.41, 17.05, 18.9, 16.7, 16.9, 14.5, 15.5, 14.6, 18.6 #> ), vs = c(0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, #> 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1), am = c(1, #> 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, #> 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1), gear = c(4, 4, 4, 3, #> 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, #> 3, 3, 4, 5, 5, 5, 5, 5, 4), carb = c(4, 4, 1, 1, 2, 1, 4, #> 2, 2, 4, 4, 3, 3, 3, 4, 4, 4, 1, 2, 1, 1, 2, 2, 4, 2, 1, #> 2, 2, 4, 6, 8, 2)), row.names = c(\"Mazda RX4\", \"Mazda RX4 Wag\", #> \"Datsun 710\", \"Hornet 4 Drive\", \"Hornet Sportabout\", \"Valiant\", #> \"Duster 360\", \"Merc 240D\", \"Merc 230\", \"Merc 280\", \"Merc 280C\", #> \"Merc 450SE\", \"Merc 450SL\", \"Merc 450SLC\", \"Cadillac Fleetwood\", #> \"Lincoln Continental\", \"Chrysler Imperial\", \"Fiat 128\", \"Honda Civic\", #> \"Toyota Corolla\", \"Toyota Corona\", \"Dodge Challenger\", \"AMC Javelin\", #> \"Camaro Z28\", \"Pontiac Firebird\", \"Fiat X1-9\", \"Porsche 914-2\", #> \"Lotus Europa\", \"Ford Pantera L\", \"Ferrari Dino\", \"Maserati Bora\", #> \"Volvo 142E\"), class = \"data.frame\") #> AIC BIC logLik deviance df.resid #> 35.2503 39.6475 -14.6251 29.2503 29 #> Random effects: #> Groups Name Std.Dev. #> vs (Intercept) 0.7896 #> Number of obs: 32, groups: vs, 2 #> Fixed Effects: #> (Intercept) mpg #> -8.7018 0.4085 construct_model( x = mtcars |> dplyr::rename(`M P G` = mpg), formula = reformulate2(c(\"M P G\", \"cyl\"), response = \"hp\"), method = \"lm\" ) |> ard_regression() |> dplyr::filter(stat_name %in% c(\"term\", \"estimate\", \"p.value\")) #> {cards} data frame: 6 x 6 #> variable context stat_name stat_label stat fmt_fn #> 1 M P G regressi… term term `M P G` NULL #> 2 M P G regressi… estimate Coeffici… -2.775 1 #> 3 M P G regressi… p.value p-value 0.213 1 #> 4 cyl regressi… term term cyl NULL #> 5 cyl regressi… estimate Coeffici… 23.979 1 #> 6 cyl regressi… p.value p-value 0.003 1"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-extract_wald_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract data from wald.test object — .extract_wald_results","title":"Extract data from wald.test object — .extract_wald_results","text":"Extract data wald.test object","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-extract_wald_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract data from wald.test object — .extract_wald_results","text":"","code":".extract_wald_results(wald_test)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-extract_wald_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract data from wald.test object — .extract_wald_results","text":"wald_test (data.frame) wald test object object aod::wald.test()","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-extract_wald_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract data from wald.test object — .extract_wald_results","text":"data frame containing wald test results.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_cohens_d_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Cohen's D Test to ARD — .format_cohens_d_results","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"Convert Cohen's D Test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_cohens_d_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"","code":".format_cohens_d_results(by, variable, lst_tidy, paired, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_cohens_d_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). paired TRUE, values x y considered paired. produces effect size equivalent one-sample effect size x - y. See also repeated_measures_d() options. ... passed cohens_d(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_cohens_d_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_cohens_d_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Cohen's D Test to ARD — .format_cohens_d_results","text":"","code":"cardx:::.format_cohens_d_results( by = \"ARM\", variable = \"AGE\", paired = FALSE, lst_tidy = cards::eval_capture_conditions( effectsize::hedges_g(data[[variable]] ~ data[[by]], paired = FALSE) |> parameters::standardize_names(style = \"broom\") ) ) #> {cards} data frame: 8 x 9 #> group1 variable stat_name stat_label stat error #> 1 ARM AGE estimate Effect S… could no… #> 2 ARM AGE conf.level CI Confi… could no… #> 3 ARM AGE conf.low CI Lower… could no… #> 4 ARM AGE conf.high CI Upper… could no… #> 5 ARM AGE mu H0 Mean 0 could no… #> 6 ARM AGE paired Paired t… FALSE could no… #> 7 ARM AGE pooled_sd Pooled S… TRUE could no… #> 8 ARM AGE alternative Alternat… two.sided could no… #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_hedges_g_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Hedge's G Test to ARD — .format_hedges_g_results","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"Convert Hedge's G Test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_hedges_g_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"","code":".format_hedges_g_results(by, variable, lst_tidy, paired, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_hedges_g_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). paired TRUE, values x y considered paired. produces effect size equivalent one-sample effect size x - y. See also repeated_measures_d() options. ... passed hedges_g(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_hedges_g_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_hedges_g_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Hedge's G Test to ARD — .format_hedges_g_results","text":"","code":"cardx:::.format_hedges_g_results( by = \"ARM\", variable = \"AGE\", paired = FALSE, lst_tidy = cards::eval_capture_conditions( effectsize::hedges_g(data[[variable]] ~ data[[by]], paired = FALSE) |> parameters::standardize_names(style = \"broom\") ) ) #> {cards} data frame: 8 x 9 #> group1 variable stat_name stat_label stat error #> 1 ARM AGE estimate Effect S… could no… #> 2 ARM AGE conf.level CI Confi… could no… #> 3 ARM AGE conf.low CI Lower… could no… #> 4 ARM AGE conf.high CI Upper… could no… #> 5 ARM AGE mu H0 Mean 0 could no… #> 6 ARM AGE paired Paired t… FALSE could no… #> 7 ARM AGE pooled_sd Pooled S… TRUE could no… #> 8 ARM AGE alternative Alternat… two.sided could no… #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_mcnemartest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert McNemar's test to ARD — .format_mcnemartest_results","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"Convert McNemar's test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_mcnemartest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"","code":".format_mcnemartest_results(by, variable, lst_tidy, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_mcnemartest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). ... passed stats::mcnemar.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_mcnemartest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_mcnemartest_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert McNemar's test to ARD — .format_mcnemartest_results","text":"","code":"cardx:::.format_mcnemartest_results( by = \"ARM\", variable = \"AGE\", lst_tidy = cards::eval_capture_conditions( stats::mcnemar.test(cards::ADSL[[\"SEX\"]], cards::ADSL[[\"EFFFL\"]]) |> broom::tidy() ) ) #> {cards} data frame: 5 x 9 #> group1 variable context stat_name stat_label stat #> 1 ARM AGE stats_mc… statistic X-square… 111.91 #> 2 ARM AGE stats_mc… p.value p-value 0 #> 3 ARM AGE stats_mc… parameter Degrees … 1 #> 4 ARM AGE stats_mc… method method McNemar'… #> 5 ARM AGE stats_mc… correct correct TRUE #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_moodtest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert mood test results to ARD — .format_moodtest_results","title":"Convert mood test results to ARD — .format_moodtest_results","text":"Convert mood test results ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_moodtest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert mood test results to ARD — .format_moodtest_results","text":"","code":".format_moodtest_results(by, variable, lst_tidy, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_moodtest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert mood test results to ARD — .format_moodtest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). ... passed mood.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_moodtest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert mood test results to ARD — .format_moodtest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_moodtest_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert mood test results to ARD — .format_moodtest_results","text":"","code":"cardx:::.format_moodtest_results( by = \"SEX\", variable = \"AGE\", lst_tidy = cards::eval_capture_conditions( stats::mood.test(ADSL[[\"AGE\"]] ~ ADSL[[\"SEX\"]]) |> broom::tidy() ) ) #> {cards} data frame: 4 x 9 #> group1 variable stat_name stat_label stat error #> 1 SEX AGE statistic Z-Statis… object '… #> 2 SEX AGE p.value p-value object '… #> 3 SEX AGE method method object '… #> 4 SEX AGE alternative Alternat… object '… #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_proptest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert prop.test to ARD — .format_proptest_results","title":"Convert prop.test to ARD — .format_proptest_results","text":"Convert prop.test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_proptest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert prop.test to ARD — .format_proptest_results","text":"","code":".format_proptest_results(by, variable, lst_tidy, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_proptest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert prop.test to ARD — .format_proptest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). ... passed prop.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_proptest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert prop.test to ARD — .format_proptest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_survfit_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Tidied Survival Fit to ARD — .format_survfit_results","title":"Convert Tidied Survival Fit to ARD — .format_survfit_results","text":"Convert Tidied Survival Fit ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_survfit_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Tidied Survival Fit to ARD — .format_survfit_results","text":"","code":".format_survfit_results(tidy_survfit)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_survfit_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Tidied Survival Fit to ARD — .format_survfit_results","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_survfit_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Tidied Survival Fit to ARD — .format_survfit_results","text":"","code":"cardx:::.format_survfit_results( broom::tidy(survival::survfit(survival::Surv(AVAL, CNSR) ~ TRTA, cards::ADTTE)) ) #> {cards} data frame: 483 x 14 #> group1 group1_level variable variable_level stat_name stat_label stat n.risk #> 1 TRTA Placebo time 1 estimate Survival… 1 86 #> 2 TRTA Placebo time 1 conf.high CI Upper… 1 86 #> 3 TRTA Placebo time 1 conf.low CI Lower… 1 86 #> 4 TRTA Placebo time 2 estimate Survival… 1 85 #> 5 TRTA Placebo time 2 conf.high CI Upper… 1 85 #> 6 TRTA Placebo time 2 conf.low CI Lower… 1 85 #> 7 TRTA Placebo time 3 estimate Survival… 1 84 #> 8 TRTA Placebo time 3 conf.high CI Upper… 1 84 #> 9 TRTA Placebo time 3 conf.low CI Lower… 1 84 #> 10 TRTA Placebo time 7 estimate Survival… 1 82 #> n.event n.censor std.error #> 1 0 1 0 #> 2 0 1 0 #> 3 0 1 0 #> 4 0 1 0 #> 5 0 1 0 #> 6 0 1 0 #> 7 0 2 0 #> 8 0 2 0 #> 9 0 2 0 #> 10 0 1 0 #> ℹ 473 more rows #> ℹ Use `print(n = ...)` to see more rows #> ℹ 3 more variables: fmt_fn, warning, error"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_ttest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert t-test to ARD — .format_ttest_results","title":"Convert t-test to ARD — .format_ttest_results","text":"Convert t-test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_ttest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert t-test to ARD — .format_ttest_results","text":"","code":".format_ttest_results(by = NULL, variable, lst_tidy, paired, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_ttest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert t-test to ARD — .format_ttest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). paired logical indicating whether want paired t-test. ... passed t.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_ttest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert t-test to ARD — .format_ttest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_ttest_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert t-test to ARD — .format_ttest_results","text":"","code":"cardx:::.format_ttest_results( by = \"ARM\", variable = \"AGE\", paired = FALSE, lst_tidy = cards::eval_capture_conditions( stats::t.test(ADSL[[\"AGE\"]] ~ ADSL[[\"ARM\"]], paired = FALSE) |> broom::tidy() ) ) #> {cards} data frame: 14 x 9 #> group1 variable stat_name stat_label stat error #> 1 ARM AGE estimate Mean Dif… object '… #> 2 ARM AGE estimate1 Group 1 … object '… #> 3 ARM AGE estimate2 Group 2 … object '… #> 4 ARM AGE statistic t Statis… object '… #> 5 ARM AGE p.value p-value object '… #> 6 ARM AGE parameter Degrees … object '… #> 7 ARM AGE conf.low CI Lower… object '… #> 8 ARM AGE conf.high CI Upper… object '… #> 9 ARM AGE method method object '… #> 10 ARM AGE alternative alternat… object '… #> 11 ARM AGE mu H0 Mean 0 object '… #> 12 ARM AGE paired Paired t… FALSE object '… #> 13 ARM AGE var.equal Equal Va… FALSE object '… #> 14 ARM AGE conf.level CI Confi… 0.95 object '… #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_wilcoxtest_results.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"Convert Wilcoxon test ARD","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_wilcoxtest_results.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"","code":".format_wilcoxtest_results(by = NULL, variable, lst_tidy, paired, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_wilcoxtest_results.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"(string) column name variable (string) variable column name lst_tidy (named list) list tidied results constructed eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$) |> broom::tidy()). paired logical indicating whether want paired test. ... passed stats::wilcox.test(...)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_wilcoxtest_results.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"ARD data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-format_wilcoxtest_results.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Wilcoxon test to ARD — .format_wilcoxtest_results","text":"","code":"# Pre-processing ADSL to have grouping factor (ARM here) with 2 levels ADSL <- cards::ADSL |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> ard_stats_wilcox_test(by = \"ARM\", variables = \"AGE\") cardx:::.format_wilcoxtest_results( by = \"ARM\", variable = \"AGE\", paired = FALSE, lst_tidy = cards::eval_capture_conditions( stats::wilcox.test(ADSL[[\"AGE\"]] ~ ADSL[[\"ARM\"]], paired = FALSE) |> broom::tidy() ) ) #> {cards} data frame: 12 x 9 #> group1 variable stat_name stat_label stat error #> 1 ARM AGE statistic X-square… invalid … #> 2 ARM AGE p.value p-value invalid … #> 3 ARM AGE method method invalid … #> 4 ARM AGE alternative alternat… invalid … #> 5 ARM AGE mu mu 0 invalid … #> 6 ARM AGE paired Paired t… FALSE invalid … #> 7 ARM AGE exact exact invalid … #> 8 ARM AGE correct correct TRUE invalid … #> 9 ARM AGE conf.int conf.int FALSE invalid … #> 10 ARM AGE conf.level CI Confi… 0.95 invalid … #> 11 ARM AGE tol.root tol.root 0 invalid … #> 12 ARM AGE digits.rank digits.r… Inf invalid … #> ℹ 3 more variables: context, fmt_fn, warning"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-paired_data_pivot_wider.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert long paired data to wide — .paired_data_pivot_wider","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"Convert long paired data wide","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-paired_data_pivot_wider.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"","code":".paired_data_pivot_wider(data, by, variable, id)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-paired_data_pivot_wider.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"data (data.frame) data frame one line per subject per group (string) column name variable (string) variable column name id (string) subject id column name","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-paired_data_pivot_wider.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"wide data frame","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-paired_data_pivot_wider.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert long paired data to wide — .paired_data_pivot_wider","text":"","code":"cards::ADSL[c(\"ARM\", \"AGE\")] |> dplyr::filter(ARM %in% c(\"Placebo\", \"Xanomeline High Dose\")) |> dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |> dplyr::arrange(USUBJID, ARM) |> cardx:::.paired_data_pivot_wider(by = \"ARM\", variable = \"AGE\", id = \"USUBJID\") #> # A tibble: 86 × 3 #> USUBJID by1 by2 #> #> 1 1 63 71 #> 2 2 64 77 #> 3 3 85 81 #> 4 4 52 75 #> 5 5 84 57 #> 6 6 79 56 #> 7 7 81 79 #> 8 8 69 56 #> 9 9 63 61 #> 10 10 81 56 #> # ℹ 76 more rows"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_probs.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"Process Survival Fit Quantile Estimates","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_probs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"","code":".process_survfit_probs(x, probs)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_probs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"x (survival::survfit()) survival::survfit() object. See details. probs (numeric) vector probabilities values (0,1) specifying survival quantiles return.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_probs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"tibble","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_probs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process Survival Fit For Quantile Estimates — .process_survfit_probs","text":"","code":"survival::survfit(survival::Surv(AVAL, CNSR) ~ TRTA, cards::ADTTE) |> cardx:::.process_survfit_probs(probs = c(0.25, 0.75)) #> # A tibble: 6 × 6 #> strata estimate conf.low conf.high prob context #> #> 1 TRTA=Placebo 142 70 181 0.25 survival_survfit #> 2 TRTA=Xanomeline High Dose 44 22 180 0.25 survival_survfit #> 3 TRTA=Xanomeline Low Dose 49 37 180 0.25 survival_survfit #> 4 TRTA=Placebo 184 183 191 0.75 survival_survfit #> 5 TRTA=Xanomeline High Dose 188 167 NA 0.75 survival_survfit #> 6 TRTA=Xanomeline Low Dose 184 180 NA 0.75 survival_survfit"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_time.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Survival Fit For Time Estimates — .process_survfit_time","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"Process Survival Fit Time Estimates","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_time.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"","code":".process_survfit_time(x, times, type)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_time.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"x (survival::survfit()) survival::survfit() object. See details. times (numeric) vector times return survival probabilities. type (string NULL) type statistic report. Available Kaplan-Meier time estimates , otherwise type ignored. Default NULL. Must one following:","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_time.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"tibble","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-process_survfit_time.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process Survival Fit For Time Estimates — .process_survfit_time","text":"","code":"survival::survfit(survival::Surv(AVAL, CNSR) ~ TRTA, cards::ADTTE) |> cardx:::.process_survfit_time(times = c(60, 180), type = \"risk\") #> # A tibble: 6 × 6 #> time estimate conf.low conf.high strata context #> #> 1 60 0.107 0.0338 0.175 TRTA=Placebo risk #> 2 60 0.306 0.151 0.432 TRTA=Xanomeline High Dose risk #> 3 60 0.268 0.122 0.390 TRTA=Xanomeline Low Dose risk #> 4 180 0.349 0.217 0.459 TRTA=Placebo risk #> 5 180 0.738 0.251 0.908 TRTA=Xanomeline High Dose risk #> 6 180 0.619 0.257 0.805 TRTA=Xanomeline Low Dose risk"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-strata_normal_quantile.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"function wraps estimation stratified percentiles assume approximation large numbers. necessary case proportions strata unequal.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-strata_normal_quantile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"","code":".strata_normal_quantile(vars, weights, conf.level)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-strata_normal_quantile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"weights (numeric NULL) weights level strata. NULL, estimated using iterative algorithm minimizes weighted squared length confidence interval. conf.level (numeric) scalar (0, 1) indicating confidence level. Default 0.95","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-strata_normal_quantile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"Stratified quantile.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-strata_normal_quantile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper Function for the Estimation of Stratified Quantiles — .strata_normal_quantile","text":"","code":"strata_data <- table(data.frame( \"f1\" = sample(c(TRUE, FALSE), 100, TRUE), \"f2\" = sample(c(\"x\", \"y\", \"z\"), 100, TRUE), stringsAsFactors = TRUE )) ns <- colSums(strata_data) ests <- strata_data[\"TRUE\", ] / ns vars <- ests * (1 - ests) / ns weights <- rep(1 / length(ns), length(ns)) cardx:::.strata_normal_quantile(vars, weights, 0.95) #> [1] 1.134584"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-update_weights_strat_wilson.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"function wraps iteration procedure allows estimate weights proportional strata. assumes minimize weighted squared length confidence interval.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-update_weights_strat_wilson.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"","code":".update_weights_strat_wilson( vars, strata_qnorm, initial_weights, n_per_strata, max.iterations = 50, conf.level = 0.95, tol = 0.001 )"},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-update_weights_strat_wilson.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"vars (numeric) normalized proportions strata. strata_qnorm (numeric) initial estimation identical weights quantiles. initial_weights (numeric) initial weights used calculate strata_qnorm. can optimized future need estimate better initial weights. n_per_strata (numeric) number elements strata. max.iterations (count) maximum number iterations tried. Convergence always checked. conf.level (numeric) scalar (0, 1) indicating confidence level. Default 0.95 tol (number) tolerance threshold convergence.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-update_weights_strat_wilson.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"list 3 elements: n_it, weights, diff_v.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/main/reference/dot-update_weights_strat_wilson.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper Function for the Estimation of Weights for proportion_ci_strat_wilson() — .update_weights_strat_wilson","text":"","code":"vs <- c(0.011, 0.013, 0.012, 0.014, 0.017, 0.018) sq <- 0.674 ws <- rep(1 / length(vs), length(vs)) ns <- c(22, 18, 17, 17, 14, 12) cardx:::.update_weights_strat_wilson(vs, sq, ws, ns, 100, 0.95, 0.001) #> $n_it #> [1] 3 #> #> $weights #> [1] 0.2067191 0.1757727 0.1896962 0.1636346 0.1357615 0.1284160 #> #> $diff_v #> [1] 1.458717e-01 1.497223e-03 1.442189e-06 #>"},{"path":"https://insightsengineering.github.io/cardx/main/reference/proportion_ci.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"Functions calculate different proportion confidence intervals use ard_proportion().","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/proportion_ci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"","code":"proportion_ci_wald(x, conf.level = 0.95, correct = FALSE) proportion_ci_wilson(x, conf.level = 0.95, correct = FALSE) proportion_ci_clopper_pearson(x, conf.level = 0.95) proportion_ci_agresti_coull(x, conf.level = 0.95) proportion_ci_jeffreys(x, conf.level = 0.95) proportion_ci_strat_wilson( x, strata, weights = NULL, conf.level = 0.95, max.iterations = 10L, correct = FALSE )"},{"path":"https://insightsengineering.github.io/cardx/main/reference/proportion_ci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"x vector binary values, .e. logical vector, numeric values c(0, 1) conf.level (numeric) scalar (0, 1) indicating confidence level. Default 0.95 correct (flag) include continuity correction. information, see example stats::prop.test(). strata (factor) variable one level per stratum length x. weights (numeric NULL) weights level strata. NULL, estimated using iterative algorithm minimizes weighted squared length confidence interval. max.iterations (count) maximum number iterations iterative procedure used find estimates optimal weights.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/proportion_ci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"Confidence interval proportion.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/proportion_ci.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"proportion_ci_wald(): Calculates Wald interval following usual textbook definition single proportion confidence interval using normal approximation. $$\\hat{p} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\hat{p}(1 - \\hat{p})}{n}}$$ proportion_ci_wilson(): Calculates Wilson interval calling stats::prop.test(). Also referred Wilson score interval. $$\\frac{\\hat{p} + \\frac{z^2_{\\alpha/2}}{2n} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\hat{p}(1 - \\hat{p})}{n} + \\frac{z^2_{\\alpha/2}}{4n^2}}}{1 + \\frac{z^2_{\\alpha/2}}{n}}$$ proportion_ci_clopper_pearson(): Calculates Clopper-Pearson interval calling stats::binom.test(). Also referred exact method. $$ \\left( \\frac{k}{n} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\frac{k}{n}(1-\\frac{k}{n})}{n} + \\frac{z^2_{\\alpha/2}}{4n^2}} \\right) / \\left( 1 + \\frac{z^2_{\\alpha/2}}{n} \\right)$$ proportion_ci_agresti_coull(): Calculates Agresti-Coull interval (created Alan Agresti Brent Coull) (95% CI) adding two successes two failures data using Wald formula construct CI. $$ \\left( \\frac{\\tilde{p} + z^2_{\\alpha/2}/2}{n + z^2_{\\alpha/2}} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\tilde{p}(1 - \\tilde{p})}{n} + \\frac{z^2_{\\alpha/2}}{4n^2}} \\right)$$ proportion_ci_jeffreys(): Calculates Jeffreys interval, equal-tailed interval based non-informative Jeffreys prior binomial proportion. $$\\left( \\text{Beta}\\left(\\frac{k}{2} + \\frac{1}{2}, \\frac{n - k}{2} + \\frac{1}{2}\\right)_\\alpha, \\text{Beta}\\left(\\frac{k}{2} + \\frac{1}{2}, \\frac{n - k}{2} + \\frac{1}{2}\\right)_{1-\\alpha} \\right)$$ proportion_ci_strat_wilson(): Calculates stratified Wilson confidence interval unequal proportions described Xin YA, Su XG. Stratified Wilson Newcombe confidence intervals multiple binomial proportions. Statistics Biopharmaceutical Research. 2010;2(3). $$\\frac{\\hat{p}_j + \\frac{z^2_{\\alpha/2}}{2n_j} \\pm z_{\\alpha/2} \\sqrt{\\frac{\\hat{p}_j(1 - \\hat{p}_j)}{n_j} + \\frac{z^2_{\\alpha/2}}{4n_j^2}}}{1 + \\frac{z^2_{\\alpha/2}}{n_j}}$$","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/proportion_ci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions for Calculating Proportion Confidence Intervals — proportion_ci","text":"","code":"x <- c( TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE ) proportion_ci_wald(x, conf.level = 0.9) #> $N #> [1] 10 #> #> $estimate #> [1] 0.5 #> #> $conf.low #> [1] 0.2399258 #> #> $conf.high #> [1] 0.7600742 #> #> $conf.level #> [1] 0.9 #> #> $method #> Wald Confidence Interval without continuity correction #> proportion_ci_wilson(x, correct = TRUE) #> $N #> [1] 10 #> #> $conf.level #> [1] 0.95 #> #> $estimate #> p #> 0.5 #> #> $statistic #> X-squared #> 0 #> #> $p.value #> [1] 1 #> #> $parameter #> df #> 1 #> #> $conf.low #> [1] 0.2365931 #> #> $conf.high #> [1] 0.7634069 #> #> $method #> Wilson Confidence Interval with continuity correction #> #> $alternative #> [1] \"two.sided\" #> proportion_ci_clopper_pearson(x) #> $N #> [1] 10 #> #> $conf.level #> [1] 0.95 #> #> $estimate #> probability of success #> 0.5 #> #> $statistic #> number of successes #> 5 #> #> $p.value #> [1] 1 #> #> $parameter #> number of trials #> 10 #> #> $conf.low #> [1] 0.187086 #> #> $conf.high #> [1] 0.812914 #> #> $method #> [1] \"Clopper-Pearson Confidence Interval\" #> #> $alternative #> [1] \"two.sided\" #> proportion_ci_agresti_coull(x) #> $N #> [1] 10 #> #> $estimate #> [1] 0.5 #> #> $conf.low #> [1] 0.2365931 #> #> $conf.high #> [1] 0.7634069 #> #> $conf.level #> [1] 0.95 #> #> $method #> [1] \"Agresti-Coull Confidence Interval\" #> proportion_ci_jeffreys(x) #> $N #> [1] 10 #> #> $estimate #> [1] 0.5 #> #> $conf.low #> [1] 0.2235287 #> #> $conf.high #> [1] 0.7764713 #> #> $conf.level #> [1] 0.95 #> #> $method #> Jeffreys Interval #> # Stratified Wilson confidence interval with unequal probabilities set.seed(1) rsp <- sample(c(TRUE, FALSE), 100, TRUE) strata_data <- data.frame( \"f1\" = sample(c(\"a\", \"b\"), 100, TRUE), \"f2\" = sample(c(\"x\", \"y\", \"z\"), 100, TRUE), stringsAsFactors = TRUE ) strata <- interaction(strata_data) n_strata <- ncol(table(rsp, strata)) # Number of strata proportion_ci_strat_wilson( x = rsp, strata = strata, conf.level = 0.90 ) #> $N #> [1] 100 #> #> $estimate #> [1] 0.49 #> #> $conf.low #> [1] 0.4072891 #> #> $conf.high #> [1] 0.5647887 #> #> $conf.level #> [1] 0.9 #> #> $weights #> a.x b.x a.y b.y a.z b.z #> 0.2074199 0.1776464 0.1915610 0.1604678 0.1351096 0.1277952 #> #> $method #> Stratified Wilson Confidence Interval without continuity correction #> # Not automatic setting of weights proportion_ci_strat_wilson( x = rsp, strata = strata, weights = rep(1 / n_strata, n_strata), conf.level = 0.90 ) #> $N #> [1] 100 #> #> $estimate #> [1] 0.49 #> #> $conf.low #> [1] 0.4190436 #> #> $conf.high #> [1] 0.5789733 #> #> $conf.level #> [1] 0.9 #> #> $method #> Stratified Wilson Confidence Interval without continuity correction #>"},{"path":"https://insightsengineering.github.io/cardx/main/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. dplyr %>%, all_of, any_of, contains, ends_with, everything, last_col, matches, num_range, one_of, starts_with, ","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/cardx/main/news/index.html","id":"breaking-changes-0-1-0-9033","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"cardx 0.1.0.9033","text":"Updated function names follow pattern ard__(). Former functions names deprecated. (#106)","code":"ard_ttest() -> ard_stats_t_test() ard_paired_ttest() -> ard_stats_paired_t_test() ard_wilcoxtest() -> ard_stats_wilcox_test() ard_paired_wilcoxtest() -> ard_stats_paired_wilcox_test() ard_chisqtest() -> ard_stats_chisq_test() ard_fishertest() -> ard_stats_fisher_test() ard_kruskaltest() -> ard_stats_kruskal_test() ard_mcnemartest() -> ard_stats_mcnemar_test() ard_moodtest() -> ard_stats_mood_test()"},{"path":"https://insightsengineering.github.io/cardx/main/news/index.html","id":"new-features-0-1-0-9033","dir":"Changelog","previous_headings":"","what":"New Features","title":"cardx 0.1.0.9033","text":"Added following functions calculating Analysis Results Data (ARD). ard_stats_aov() calculating ANOVA results using stats::aov(). (#3) ard_stats_anova() calculating ANOVA results using stats::anova(). (#12) ard_stats_mcnemar_test_long() McNemar’s test long data using stats::mcnemar.test(). ard_aod_wald_test() calculating Wald Tests regression models using aod::wald.test(). (#84) ard_car_anova() calculating ANOVA results using car::Anova(). (#3) ard_stats_oneway_test() calculating ANOVA results using stats::oneway.test(). (#3) ard_effectsize_cohens_d(), ard_effectsize_paired_cohens_d(), ard_effectsize_hedges_g(), ard_effectsize_paired_hedges_g() standardized differences using effectsize::cohens_d() effectsize::hedges_g(). (#50) ard_stats_prop_test() tests proportions using stats::prop.test(). (#64) ard_regression_basic() basic regression models. function focuses matching terms underlying variables names. (#46) ard_smd_smd() calculating standardized mean differences using smd::smd(). (#4) ard_survival_survfit() survival analyses using survival::survfit(). (#43) ard_survey_svycontinuous() calculating univariate summary statistics weighted/survey data using many functions {survey} package. (#68) ard_survey_svychisq() weighted/survey chi-squared test using survey::svychisq(). (#72) ard_survey_svyttest() weighted/survey t-tests using survey::svyttest(). (#70) ard_survey_svyranktest() weighted/survey rank tests using survey::svyranktest(). (#71) ard_car_vif() calculating variance inflation factor using car::vif(). (#10) ard_emmeans_mean_difference() calculating least-squares mean differences using {emmeans} package. (#34) Updated functions ard_stats_t_test(), ard_stats_paired_t_test(), ard_stats_wilcox_test(), ard_stats_paired_wilcox_test(), ard_stats_chisq_test(), ard_stats_fisher_test(), ard_stats_kruskal_test(), ard_stats_mcnemar_test(), ard_stats_mood_test() accept multiple variables . Independent tests calculated variable. variable argument renamed variables. (#77) Updated ard_stats_t_test() ard_stats_wilcox_test() longer require argument, yields central estimates confidence intervals. (#82) Imported cli call environment functions https://github.com/ddsjoberg/standalone/blob/main/R/standalone-cli_call_env.R implemented set_cli_abort_call user-facing functions. (#111) Added ard_survival_survdiff() creating results survival::survdiff(). (#113)","code":""},{"path":"https://insightsengineering.github.io/cardx/main/news/index.html","id":"cardx-010","dir":"Changelog","previous_headings":"","what":"cardx 0.1.0","title":"cardx 0.1.0","text":"CRAN release: 2024-03-18 Initial release.","code":""}] diff --git a/pkgdown.yml b/pkgdown.yml index 2601f7e5..9cea742b 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.1 pkgdown: 2.0.9 pkgdown_sha: ~ articles: {} -last_built: 2024-04-30T22:19Z +last_built: 2024-05-03T23:27Z urls: reference: https://insightsengineering.github.io/cardx/main/reference article: https://insightsengineering.github.io/cardx/main/articles