diff --git a/main/404.html b/main/404.html
index a38ab7139..052cf5fe4 100644
--- a/main/404.html
+++ b/main/404.html
@@ -47,6 +47,14 @@
Changelog
+
+ Versions
+
diff --git a/main/CONTRIBUTING.html b/main/CONTRIBUTING.html
index a260acf29..0faa30926 100644
--- a/main/CONTRIBUTING.html
+++ b/main/CONTRIBUTING.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/LICENSE-text.html b/main/LICENSE-text.html
index 457f9c2f4..ab94fe7a9 100644
--- a/main/LICENSE-text.html
+++ b/main/LICENSE-text.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/PULL_REQUEST_TEMPLATE.html b/main/PULL_REQUEST_TEMPLATE.html
index aeb2efa58..e014e1132 100644
--- a/main/PULL_REQUEST_TEMPLATE.html
+++ b/main/PULL_REQUEST_TEMPLATE.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/SECURITY.html b/main/SECURITY.html
index af1f57c1d..56e0a1179 100644
--- a/main/SECURITY.html
+++ b/main/SECURITY.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/authors.html b/main/authors.html
index 84813a32b..687f0cd8f 100644
--- a/main/authors.html
+++ b/main/authors.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/index.html b/main/index.html
index c394121d4..bc70920ba 100644
--- a/main/index.html
+++ b/main/index.html
@@ -49,6 +49,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_aod_wald_test.html b/main/reference/ard_aod_wald_test.html
index faf76b1f9..577273d2f 100644
--- a/main/reference/ard_aod_wald_test.html
+++ b/main/reference/ard_aod_wald_test.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_attributes.html b/main/reference/ard_attributes.html
index 3b983336a..e8080ce86 100644
--- a/main/reference/ard_attributes.html
+++ b/main/reference/ard_attributes.html
@@ -38,6 +38,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_car_anova.html b/main/reference/ard_car_anova.html
index 45bac38ce..847a0b696 100644
--- a/main/reference/ard_car_anova.html
+++ b/main/reference/ard_car_anova.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_car_vif.html b/main/reference/ard_car_vif.html
index e9b4d2070..6a44897b3 100644
--- a/main/reference/ard_car_vif.html
+++ b/main/reference/ard_car_vif.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_continuous.survey.design.html b/main/reference/ard_continuous.survey.design.html
index f3eb0095a..cb66fcb56 100644
--- a/main/reference/ard_continuous.survey.design.html
+++ b/main/reference/ard_continuous.survey.design.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_effectsize_cohens_d.html b/main/reference/ard_effectsize_cohens_d.html
index 7ca34fc09..639db2aa4 100644
--- a/main/reference/ard_effectsize_cohens_d.html
+++ b/main/reference/ard_effectsize_cohens_d.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_effectsize_hedges_g.html b/main/reference/ard_effectsize_hedges_g.html
index fc3900bbc..96a633c9f 100644
--- a/main/reference/ard_effectsize_hedges_g.html
+++ b/main/reference/ard_effectsize_hedges_g.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_emmeans_mean_difference.html b/main/reference/ard_emmeans_mean_difference.html
index 2f283b769..dce9c9620 100644
--- a/main/reference/ard_emmeans_mean_difference.html
+++ b/main/reference/ard_emmeans_mean_difference.html
@@ -38,6 +38,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_proportion_ci.html b/main/reference/ard_proportion_ci.html
index 62508c759..001ba1830 100644
--- a/main/reference/ard_proportion_ci.html
+++ b/main/reference/ard_proportion_ci.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_regression.html b/main/reference/ard_regression.html
index 901bd12e6..0fe09f47a 100644
--- a/main/reference/ard_regression.html
+++ b/main/reference/ard_regression.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_regression_basic.html b/main/reference/ard_regression_basic.html
index 25b0e3be5..f154a01a0 100644
--- a/main/reference/ard_regression_basic.html
+++ b/main/reference/ard_regression_basic.html
@@ -48,6 +48,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_smd_smd.html b/main/reference/ard_smd_smd.html
index 3dfdeaed9..80fa81191 100644
--- a/main/reference/ard_smd_smd.html
+++ b/main/reference/ard_smd_smd.html
@@ -28,6 +28,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_anova.html b/main/reference/ard_stats_anova.html
index a4a86594e..fd8283ed4 100644
--- a/main/reference/ard_stats_anova.html
+++ b/main/reference/ard_stats_anova.html
@@ -30,6 +30,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_aov.html b/main/reference/ard_stats_aov.html
index bbbd1622f..cb34b797e 100644
--- a/main/reference/ard_stats_aov.html
+++ b/main/reference/ard_stats_aov.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_chisq_test.html b/main/reference/ard_stats_chisq_test.html
index 690fdab19..a4c252c33 100644
--- a/main/reference/ard_stats_chisq_test.html
+++ b/main/reference/ard_stats_chisq_test.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_fisher_test.html b/main/reference/ard_stats_fisher_test.html
index ca132b4ba..14722079a 100644
--- a/main/reference/ard_stats_fisher_test.html
+++ b/main/reference/ard_stats_fisher_test.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_kruskal_test.html b/main/reference/ard_stats_kruskal_test.html
index 0b5035a7c..4b3415235 100644
--- a/main/reference/ard_stats_kruskal_test.html
+++ b/main/reference/ard_stats_kruskal_test.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_mcnemar_test.html b/main/reference/ard_stats_mcnemar_test.html
index 951eb858f..524381321 100644
--- a/main/reference/ard_stats_mcnemar_test.html
+++ b/main/reference/ard_stats_mcnemar_test.html
@@ -34,6 +34,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_mood_test.html b/main/reference/ard_stats_mood_test.html
index 2808d8f0a..385652a3c 100644
--- a/main/reference/ard_stats_mood_test.html
+++ b/main/reference/ard_stats_mood_test.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_oneway_test.html b/main/reference/ard_stats_oneway_test.html
index 72e8df482..5f68f8bb5 100644
--- a/main/reference/ard_stats_oneway_test.html
+++ b/main/reference/ard_stats_oneway_test.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_prop_test.html b/main/reference/ard_stats_prop_test.html
index 1595da2f5..9785075f1 100644
--- a/main/reference/ard_stats_prop_test.html
+++ b/main/reference/ard_stats_prop_test.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_t_test.html b/main/reference/ard_stats_t_test.html
index 7a0b55d32..756f2201e 100644
--- a/main/reference/ard_stats_t_test.html
+++ b/main/reference/ard_stats_t_test.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_stats_wilcox_test.html b/main/reference/ard_stats_wilcox_test.html
index a38aa2cf9..614784c74 100644
--- a/main/reference/ard_stats_wilcox_test.html
+++ b/main/reference/ard_stats_wilcox_test.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_survey_svychisq.html b/main/reference/ard_survey_svychisq.html
index 2a6208a78..cf366a8b9 100644
--- a/main/reference/ard_survey_svychisq.html
+++ b/main/reference/ard_survey_svychisq.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_survey_svyranktest.html b/main/reference/ard_survey_svyranktest.html
index 9293b8b98..abfee3d7a 100644
--- a/main/reference/ard_survey_svyranktest.html
+++ b/main/reference/ard_survey_svyranktest.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_survey_svyttest.html b/main/reference/ard_survey_svyttest.html
index 7234882b7..9749a2ed2 100644
--- a/main/reference/ard_survey_svyttest.html
+++ b/main/reference/ard_survey_svyttest.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_survival_survdiff.html b/main/reference/ard_survival_survdiff.html
index d74ae006e..c29941f02 100644
--- a/main/reference/ard_survival_survdiff.html
+++ b/main/reference/ard_survival_survdiff.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/ard_survival_survfit.html b/main/reference/ard_survival_survfit.html
index e57ddfa64..a48f132bb 100644
--- a/main/reference/ard_survival_survfit.html
+++ b/main/reference/ard_survival_survfit.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/cardx-package.html b/main/reference/cardx-package.html
index 9ab0e1985..70ed03bc1 100644
--- a/main/reference/cardx-package.html
+++ b/main/reference/cardx-package.html
@@ -26,6 +26,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/construction_helpers.html b/main/reference/construction_helpers.html
index 19d55de35..e9dae3c65 100644
--- a/main/reference/construction_helpers.html
+++ b/main/reference/construction_helpers.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-extract_wald_results.html b/main/reference/dot-extract_wald_results.html
index 6470cc61e..a52e44101 100644
--- a/main/reference/dot-extract_wald_results.html
+++ b/main/reference/dot-extract_wald_results.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-format_cohens_d_results.html b/main/reference/dot-format_cohens_d_results.html
index 771d9b8a5..65c8a8e0d 100644
--- a/main/reference/dot-format_cohens_d_results.html
+++ b/main/reference/dot-format_cohens_d_results.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-format_hedges_g_results.html b/main/reference/dot-format_hedges_g_results.html
index dfe17fbd5..f081943de 100644
--- a/main/reference/dot-format_hedges_g_results.html
+++ b/main/reference/dot-format_hedges_g_results.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-format_mcnemartest_results.html b/main/reference/dot-format_mcnemartest_results.html
index d7a9f0675..6b5941d5b 100644
--- a/main/reference/dot-format_mcnemartest_results.html
+++ b/main/reference/dot-format_mcnemartest_results.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-format_moodtest_results.html b/main/reference/dot-format_moodtest_results.html
index 95ae8a1b0..0c0ca1030 100644
--- a/main/reference/dot-format_moodtest_results.html
+++ b/main/reference/dot-format_moodtest_results.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-format_proptest_results.html b/main/reference/dot-format_proptest_results.html
index 20d97cb47..a30a3c44a 100644
--- a/main/reference/dot-format_proptest_results.html
+++ b/main/reference/dot-format_proptest_results.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-format_survfit_results.html b/main/reference/dot-format_survfit_results.html
index e7c6f2752..8e5148d1a 100644
--- a/main/reference/dot-format_survfit_results.html
+++ b/main/reference/dot-format_survfit_results.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-format_ttest_results.html b/main/reference/dot-format_ttest_results.html
index 105cba350..e4e3427ee 100644
--- a/main/reference/dot-format_ttest_results.html
+++ b/main/reference/dot-format_ttest_results.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-format_wilcoxtest_results.html b/main/reference/dot-format_wilcoxtest_results.html
index 7ef98c912..4efc3bde5 100644
--- a/main/reference/dot-format_wilcoxtest_results.html
+++ b/main/reference/dot-format_wilcoxtest_results.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-paired_data_pivot_wider.html b/main/reference/dot-paired_data_pivot_wider.html
index 026028ef1..f8fcf40eb 100644
--- a/main/reference/dot-paired_data_pivot_wider.html
+++ b/main/reference/dot-paired_data_pivot_wider.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-process_survfit_probs.html b/main/reference/dot-process_survfit_probs.html
index b37a34e71..30b112d4a 100644
--- a/main/reference/dot-process_survfit_probs.html
+++ b/main/reference/dot-process_survfit_probs.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-process_survfit_time.html b/main/reference/dot-process_survfit_time.html
index 5f2ad54a2..952f68c02 100644
--- a/main/reference/dot-process_survfit_time.html
+++ b/main/reference/dot-process_survfit_time.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-strata_normal_quantile.html b/main/reference/dot-strata_normal_quantile.html
index cd9d864ad..5c4ea52b5 100644
--- a/main/reference/dot-strata_normal_quantile.html
+++ b/main/reference/dot-strata_normal_quantile.html
@@ -28,6 +28,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-update_weights_strat_wilson.html b/main/reference/dot-update_weights_strat_wilson.html
index 241ce666e..a3be237ea 100644
--- a/main/reference/dot-update_weights_strat_wilson.html
+++ b/main/reference/dot-update_weights_strat_wilson.html
@@ -28,6 +28,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/index.html b/main/reference/index.html
index bfaaca4de..60aa131c7 100644
--- a/main/reference/index.html
+++ b/main/reference/index.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/proportion_ci.html b/main/reference/proportion_ci.html
index b0a2af16c..39e693ece 100644
--- a/main/reference/proportion_ci.html
+++ b/main/reference/proportion_ci.html
@@ -24,6 +24,14 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/reexports.html b/main/reference/reexports.html
index 516199084..15688491f 100644
--- a/main/reference/reexports.html
+++ b/main/reference/reexports.html
@@ -46,6 +46,14 @@
Changelog
+
+ Versions
+
diff --git a/main/search.json b/main/search.json
index 8fa56422f..d9fb8af5e 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.9042, 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.9042}, 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_attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Attributes — ard_attributes.survey.design","title":"ARD Attributes — ard_attributes.survey.design","text":"Add variable attributes ARD data frame. label attribute added columns, label specified label set column using label= argument, column name placed label statistic. class attribute also returned columns. attribute returned attributes() also added, e.g. factor levels.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Attributes — ard_attributes.survey.design","text":"","code":"# S3 method for survey.design ard_attributes(data, variables = everything(), label = NULL, ...)"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Attributes — ard_attributes.survey.design","text":"data (survey.design) design object often created survey::svydesign(). variables (tidy-select) variables include label (named list) named list variable labels, e.g. list(cyl = \". Cylinders\"). Default NULL ... dots future extensions must empty.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_attributes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Attributes — ard_attributes.survey.design","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_attributes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Attributes — ard_attributes.survey.design","text":"","code":"data(api, package = \"survey\") dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) ard_attributes( data = dclus1, variables = c(sname, dname), label = list(sname = \"School Name\", dname = \"District Name\") ) #> {cards} data frame: 4 x 5 #> variable context stat_name stat_label stat #> 1 sname attribut… label Variable… School N… #> 2 sname attribut… class Variable… character #> 3 dname attribut… label Variable… District… #> 4 dname attribut… class Variable… character"},{"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_continuous.survey.design.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Continuous Survey Statistics — ard_continuous.survey.design","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","text":"Returns ARD weighted statistics using {survey} package.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_continuous.survey.design.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","text":"","code":"# S3 method for survey.design ard_continuous( data, variables, by = NULL, statistic = everything() ~ c(\"median\", \"p25\", \"p75\"), fmt_fn = NULL, stat_label = NULL, ... )"},{"path":"https://insightsengineering.github.io/cardx/reference/ard_continuous.survey.design.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","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\"). ... dots future extensions must empty.","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_continuous.survey.design.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/reference/ard_continuous.survey.design.html","id":"statistic-argument","dir":"Reference","previous_headings":"","what":"statistic argument","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","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_continuous.survey.design.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","text":"","code":"data(api, package = \"survey\") dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) ard_continuous( 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_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: 9 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… method method Cohen's D #> 6 ARM AGE effectsi… mu H0 Mean 0 #> 7 ARM AGE effectsi… paired Paired t… FALSE #> 8 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 9 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: 9 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… method method Paired C… #> 6 ARM AGE effectsi… mu H0 Mean 0 #> 7 ARM AGE effectsi… paired Paired t… TRUE #> 8 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 9 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: 9 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… method method Hedge's G #> 6 ARM AGE effectsi… mu H0 Mean 0 #> 7 ARM AGE effectsi… paired Paired t… FALSE #> 8 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 9 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: 9 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… method method Paired H… #> 6 ARM AGE effectsi… mu H0 Mean 0 #> 7 ARM AGE effectsi… paired Paired t… TRUE #> 8 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 9 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. Additionally, function add confidence interval SMD std.error=TRUE, original smd::smd() include.","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, std.error = TRUE, conf.level = 0.95, ...)"},{"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. std.error (scalar logical) Logical indicator computing standard errors using smd::compute_smd_var(). Default TRUE. conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed smd::smd()","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 = SEX, variables = AGE) #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 SEX AGE smd_smd estimate Standard… 0.157 #> 2 SEX AGE smd_smd std.error Standard… 0.127 #> 3 SEX AGE smd_smd conf.low conf.low -0.091 #> 4 SEX AGE smd_smd conf.high conf.high 0.405 #> 5 SEX AGE smd_smd method method Standard… #> 6 SEX AGE smd_smd gref Integer … 1 #> ℹ 3 more variables: fmt_fn, warning, error ard_smd_smd(cards::ADSL, by = SEX, variables = AGEGR1) #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 SEX AGEGR1 smd_smd estimate Standard… 0.103 #> 2 SEX AGEGR1 smd_smd std.error Standard… 0.127 #> 3 SEX AGEGR1 smd_smd conf.low conf.low -0.145 #> 4 SEX AGEGR1 smd_smd conf.high conf.high 0.351 #> 5 SEX AGEGR1 smd_smd method method Standard… #> 6 SEX 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: 10 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… p.value p-value 0.001 1 #> 10 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_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\" ) |> broom.mixed::tidy() #> # A tibble: 3 × 7 #> effect group term estimate std.error statistic p.value #> #> 1 fixed NA (Intercept) -8.70 4.12 -2.11 0.0347 #> 2 fixed NA mpg 0.409 0.199 2.05 0.0403 #> 3 ran_pars vs sd__(Intercept) 0.790 NA NA NA 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… object '… #> 2 ARM AGE conf.level CI Confi… object '… #> 3 ARM AGE conf.low CI Lower… object '… #> 4 ARM AGE conf.high CI Upper… object '… #> 5 ARM AGE mu H0 Mean 0 object '… #> 6 ARM AGE paired Paired t… FALSE object '… #> 7 ARM AGE pooled_sd Pooled S… TRUE object '… #> 8 ARM AGE alternative Alternat… two.sided object '… #> ℹ 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… object '… #> 2 ARM AGE conf.level CI Confi… object '… #> 3 ARM AGE conf.low CI Lower… object '… #> 4 ARM AGE conf.high CI Upper… object '… #> 5 ARM AGE mu H0 Mean 0 object '… #> 6 ARM AGE paired Paired t… FALSE object '… #> 7 ARM AGE pooled_sd Pooled S… TRUE object '… #> 8 ARM AGE alternative Alternat… two.sided object '… #> ℹ 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… cannot u… #> 2 ARM AGE estimate1 Group 1 … cannot u… #> 3 ARM AGE estimate2 Group 2 … cannot u… #> 4 ARM AGE statistic t Statis… cannot u… #> 5 ARM AGE p.value p-value cannot u… #> 6 ARM AGE parameter Degrees … cannot u… #> 7 ARM AGE conf.low CI Lower… cannot u… #> 8 ARM AGE conf.high CI Upper… cannot u… #> 9 ARM AGE method method cannot u… #> 10 ARM AGE alternative alternat… cannot u… #> 11 ARM AGE mu H0 Mean 0 cannot u… #> 12 ARM AGE paired Paired t… FALSE cannot u… #> 13 ARM AGE var.equal Equal Va… FALSE cannot u… #> 14 ARM AGE conf.level CI Confi… 0.95 cannot u… #> ℹ 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… cannot u… #> 2 ARM AGE p.value p-value cannot u… #> 3 ARM AGE method method cannot u… #> 4 ARM AGE alternative alternat… cannot u… #> 5 ARM AGE mu mu 0 cannot u… #> 6 ARM AGE paired Paired t… FALSE cannot u… #> 7 ARM AGE exact exact cannot u… #> 8 ARM AGE correct correct TRUE cannot u… #> 9 ARM AGE conf.int conf.int FALSE cannot u… #> 10 ARM AGE conf.level CI Confi… 0.95 cannot u… #> 11 ARM AGE tol.root tol.root 0 cannot u… #> 12 ARM AGE digits.rank digits.r… Inf cannot u… #> ℹ 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. cards ard_attributes, ard_categorical, ard_continuous, ard_dichotomous, ard_missing 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-9042","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"cardx 0.1.0.9042","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-9042","dir":"Changelog","previous_headings":"","what":"New Features","title":"cardx 0.1.0.9042","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_continuous.survey.design() calculating univariate summary statistics weighted/survey data using many functions {survey} package. (#68) ard_attributes.survey.design() summarizing labels attributes weighted/survey data using many functions {survey} package. 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.9042, 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.9042}, 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_attributes.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Attributes — ard_attributes.survey.design","title":"ARD Attributes — ard_attributes.survey.design","text":"Add variable attributes ARD data frame. label attribute added columns, label specified label set column using label= argument, column name placed label statistic. class attribute also returned columns. attribute returned attributes() also added, e.g. factor levels.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_attributes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Attributes — ard_attributes.survey.design","text":"","code":"# S3 method for survey.design ard_attributes(data, variables = everything(), label = NULL, ...)"},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_attributes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Attributes — ard_attributes.survey.design","text":"data (survey.design) design object often created survey::svydesign(). variables (tidy-select) variables include label (named list) named list variable labels, e.g. list(cyl = \". Cylinders\"). Default NULL ... dots future extensions must empty.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_attributes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Attributes — ard_attributes.survey.design","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_attributes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Attributes — ard_attributes.survey.design","text":"","code":"data(api, package = \"survey\") dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) ard_attributes( data = dclus1, variables = c(sname, dname), label = list(sname = \"School Name\", dname = \"District Name\") ) #> {cards} data frame: 4 x 5 #> variable context stat_name stat_label stat #> 1 sname attribut… label Variable… School N… #> 2 sname attribut… class Variable… character #> 3 dname attribut… label Variable… District… #> 4 dname attribut… class Variable… character"},{"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_continuous.survey.design.html","id":null,"dir":"Reference","previous_headings":"","what":"ARD Continuous Survey Statistics — ard_continuous.survey.design","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","text":"Returns ARD weighted statistics using {survey} package.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_continuous.survey.design.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","text":"","code":"# S3 method for survey.design ard_continuous( 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_continuous.survey.design.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","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\"). ... dots future extensions must empty.","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_continuous.survey.design.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","text":"ARD data frame class 'card'","code":""},{"path":"https://insightsengineering.github.io/cardx/main/reference/ard_continuous.survey.design.html","id":"statistic-argument","dir":"Reference","previous_headings":"","what":"statistic argument","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","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_continuous.survey.design.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"ARD Continuous Survey Statistics — ard_continuous.survey.design","text":"","code":"data(api, package = \"survey\") dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) ard_continuous( 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_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: 9 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… method method Cohen's D #> 6 ARM AGE effectsi… mu H0 Mean 0 #> 7 ARM AGE effectsi… paired Paired t… FALSE #> 8 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 9 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: 9 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… method method Paired C… #> 6 ARM AGE effectsi… mu H0 Mean 0 #> 7 ARM AGE effectsi… paired Paired t… TRUE #> 8 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 9 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: 9 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… method method Hedge's G #> 6 ARM AGE effectsi… mu H0 Mean 0 #> 7 ARM AGE effectsi… paired Paired t… FALSE #> 8 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 9 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: 9 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… method method Paired H… #> 6 ARM AGE effectsi… mu H0 Mean 0 #> 7 ARM AGE effectsi… paired Paired t… TRUE #> 8 ARM AGE effectsi… pooled_sd Pooled S… TRUE #> 9 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. Additionally, function add confidence interval SMD std.error=TRUE, original smd::smd() include.","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, std.error = TRUE, conf.level = 0.95, ...)"},{"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. std.error (scalar logical) Logical indicator computing standard errors using smd::compute_smd_var(). Default TRUE. conf.level (scalar numeric) confidence level confidence interval. Default 0.95. ... arguments passed smd::smd()","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 = SEX, variables = AGE) #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 SEX AGE smd_smd estimate Standard… 0.157 #> 2 SEX AGE smd_smd std.error Standard… 0.127 #> 3 SEX AGE smd_smd conf.low conf.low -0.091 #> 4 SEX AGE smd_smd conf.high conf.high 0.405 #> 5 SEX AGE smd_smd method method Standard… #> 6 SEX AGE smd_smd gref Integer … 1 #> ℹ 3 more variables: fmt_fn, warning, error ard_smd_smd(cards::ADSL, by = SEX, variables = AGEGR1) #> {cards} data frame: 6 x 9 #> group1 variable context stat_name stat_label stat #> 1 SEX AGEGR1 smd_smd estimate Standard… 0.103 #> 2 SEX AGEGR1 smd_smd std.error Standard… 0.127 #> 3 SEX AGEGR1 smd_smd conf.low conf.low -0.145 #> 4 SEX AGEGR1 smd_smd conf.high conf.high 0.351 #> 5 SEX AGEGR1 smd_smd method method Standard… #> 6 SEX 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: 10 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… p.value p-value 0.001 1 #> 10 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_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\" ) |> broom.mixed::tidy() #> # A tibble: 3 × 7 #> effect group term estimate std.error statistic p.value #> #> 1 fixed NA (Intercept) -8.70 4.12 -2.11 0.0347 #> 2 fixed NA mpg 0.409 0.199 2.05 0.0403 #> 3 ran_pars vs sd__(Intercept) 0.790 NA NA NA 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… object '… #> 2 ARM AGE conf.level CI Confi… object '… #> 3 ARM AGE conf.low CI Lower… object '… #> 4 ARM AGE conf.high CI Upper… object '… #> 5 ARM AGE mu H0 Mean 0 object '… #> 6 ARM AGE paired Paired t… FALSE object '… #> 7 ARM AGE pooled_sd Pooled S… TRUE object '… #> 8 ARM AGE alternative Alternat… two.sided object '… #> ℹ 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… object '… #> 2 ARM AGE conf.level CI Confi… object '… #> 3 ARM AGE conf.low CI Lower… object '… #> 4 ARM AGE conf.high CI Upper… object '… #> 5 ARM AGE mu H0 Mean 0 object '… #> 6 ARM AGE paired Paired t… FALSE object '… #> 7 ARM AGE pooled_sd Pooled S… TRUE object '… #> 8 ARM AGE alternative Alternat… two.sided object '… #> ℹ 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… cannot u… #> 2 ARM AGE estimate1 Group 1 … cannot u… #> 3 ARM AGE estimate2 Group 2 … cannot u… #> 4 ARM AGE statistic t Statis… cannot u… #> 5 ARM AGE p.value p-value cannot u… #> 6 ARM AGE parameter Degrees … cannot u… #> 7 ARM AGE conf.low CI Lower… cannot u… #> 8 ARM AGE conf.high CI Upper… cannot u… #> 9 ARM AGE method method cannot u… #> 10 ARM AGE alternative alternat… cannot u… #> 11 ARM AGE mu H0 Mean 0 cannot u… #> 12 ARM AGE paired Paired t… FALSE cannot u… #> 13 ARM AGE var.equal Equal Va… FALSE cannot u… #> 14 ARM AGE conf.level CI Confi… 0.95 cannot u… #> ℹ 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… cannot u… #> 2 ARM AGE p.value p-value cannot u… #> 3 ARM AGE method method cannot u… #> 4 ARM AGE alternative alternat… cannot u… #> 5 ARM AGE mu mu 0 cannot u… #> 6 ARM AGE paired Paired t… FALSE cannot u… #> 7 ARM AGE exact exact cannot u… #> 8 ARM AGE correct correct TRUE cannot u… #> 9 ARM AGE conf.int conf.int FALSE cannot u… #> 10 ARM AGE conf.level CI Confi… 0.95 cannot u… #> 11 ARM AGE tol.root tol.root 0 cannot u… #> 12 ARM AGE digits.rank digits.r… Inf cannot u… #> ℹ 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. cards ard_attributes, ard_categorical, ard_continuous, ard_dichotomous, ard_missing 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-9042","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"cardx 0.1.0.9042","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-9042","dir":"Changelog","previous_headings":"","what":"New Features","title":"cardx 0.1.0.9042","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_continuous.survey.design() calculating univariate summary statistics weighted/survey data using many functions {survey} package. (#68) ard_attributes.survey.design() summarizing labels attributes weighted/survey data using many functions {survey} package. 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 7cbe79acb..c36f29af4 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -1,8 +1,8 @@
-pandoc: 3.1.13
+pandoc: '3.2'
pkgdown: 2.0.9
pkgdown_sha: ~
articles: {}
-last_built: 2024-05-15T18:22Z
+last_built: 2024-05-22T21:07Z
urls:
reference: https://insightsengineering.github.io/cardx/main/reference
article: https://insightsengineering.github.io/cardx/main/articles