-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tbl_ard*() article draft #2082
base: main
Are you sure you want to change the base?
tbl_ard*() article draft #2082
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking great, thank you!! Just a few comments before I log off..
) | ||
``` | ||
|
||
For most tables built using {gtsummary}, ARDs for quality control or table summaries can be extracted. However, there are instances where an ARD first approach is beneficial as building more complex tables may require analysis of the data structures prior to table construction. For this ARD first approach, {gtsummary} has `tbl_ard*()` functions that will generate a tables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the prose, can you put each sentence on its own line? This will make git diffs easier to read in the future
For most tables built using {gtsummary}, ARDs for quality control or table summaries can be extracted. However, there are instances where an ARD first approach is beneficial as building more complex tables may require analysis of the data structures prior to table construction. For this ARD first approach, {gtsummary} has `tbl_ard*()` functions that will generate a tables. | ||
|
||
- `tbl_ard_continuous()` - for ARDs summarizing continuous variables. | ||
- `tbl_ard_hierarchical()` - for ARDs containing nested or hierarchical data structures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move tbl_ard_hierarchical()
to the bottom? I can't think of a situation where this will be useful yet
.by = ARM, | ||
ard_categorical(variables = c("AGEGR1", "RACE", "SEX", "ETHNIC")), | ||
ard_continuous(variables = "AGE"), | ||
.attributes = TRUE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some commentary that .attributes
, .missing, and
.total_nare not required, then talk about when/how they are useful to include? I believe i recently added similar text to the
tbl_ard_summary()` help file.
The ARD for this table can be extracted using the `gather_ard()` function. | ||
|
||
### Building a disposition table | ||
Here, we use tbl_ard_wide_summary to build a Pooled disposition table. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also include the vanilla tbl_summary()
code along with gather_ard()
?
|
||
### Complex Analysis Tables | ||
|
||
The ARD to Table pipeline is most convenient when trying to consolidate multiple analysis steps into an ARD to feed only the relevant stats to the table building machinery. In the example below, we create ARDs that compute the survival probabilities of both treatment groups, and also conduct a one sample t-test on the survival estimates. The resulting ARD is filtered to only contain the relevant estimate values which can be used generate the table we want. Note that in this pipeline, all the survival analysis stats such as confidence intervals and and standard error are retained in the ARD object - enabling reuse of this object to generate other tables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one sample t-test on the survival estimates
I think the language describing the analysis methods can be cleaned up. I can help you with that when i return.
What changes are proposed in this pull request?
addition of
tbl_ard()
article.If there is an GitHub issue associated with this pull request, please provide link.
Reviewer Checklist (if item does not apply, mark is as complete)
pkgdown::build_site()
. Check the R console for errors, and review the rendered website.devtools::test_coverage()
usethis::use_spell_check()
runs with no spelling errors in documentationWhen the branch is ready to be merged into master:
NEWS.md
with the changes from this pull request under the heading "# gtsummary (development version)
". If there is an issue associated with the pull request, reference it in parentheses at the end update (seeNEWS.md
for examples).usethis::use_version(which = "dev")
usethis::use_spell_check()
again