Skip to content

Commit

Permalink
change version to 0.9.0, [skip vbump] (insightsengineering#1052)
Browse files Browse the repository at this point in the history
# Pull Request

<!--- Replace `#nnn` with your issue link for reference. -->

Fixes #nnn

---------

Co-authored-by: Melkiades <[email protected]>
  • Loading branch information
shajoezhu and Melkiades committed Sep 1, 2023
1 parent 92ee48b commit 95158c9
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tern
Title: Create Common TLGs Used in Clinical Trials
Version: 0.8.5.9020
Version: 0.9.0
Date: 2023-09-01
Authors@R: c(
person("Joe", "Zhu", , "[email protected]", role = c("aut", "cre")),
Expand Down
11 changes: 6 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# tern 0.8.5.9020
# tern 0.9.0
### New Features
* Added `stat_propdiff_ci` function to calculate proportion/risk difference and CI.
* Added risk difference column functionality via the `riskdiff` argument to functions `count_occurrences`, `count_occurrences_by_grade`, `count_patients_with_event`, `count_patients_with_flags`, `analyze_num_patients`, and `summarize_num_patients`.

### Enhancements
* Refactored `a_summary` to no longer use helper function `create_afun_summary`.
* Refactored `summarize_vars` and `compare_vars` to use refactored `a_summary`.
* Refactored the function `a_summary` to no longer use the helper function `create_afun_summary`.
* Refactored functions `summarize_vars` and `compare_vars` to use the refactored `a_summary` function.
* Created new internal helper functions `ungroup_stats` to ungroup statistics calculated for factor variables, and `a_summary_internal` to perform calculations for `a_summary`.
* Added `stat_propdiff_ci` function to calculate proportion/risk difference and CI.
* Added risk difference column functionality via the `riskdiff` argument to `count_occurrences`, `count_occurrences_by_grade`, `count_patients_with_event`, `count_patients_with_flags`, `analyze_num_patients`, and `summarize_num_patients`.

### Bug Fixes
* Fixed bug in `s_count_occurrences_by_grade` so that "missing" grade always appears as the final level.
Expand Down
3 changes: 1 addition & 2 deletions R/prop_diff_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ prop_cmh <- function(ary) {

#' @describeIn h_prop_diff_test performs the Chi-Squared test with Schouten correction.
#'
#' @seealso For information on the Schouten correction (Schouten, 1980),
#' visit \url{https://onlinelibrary.wiley.com/doi/abs/10.1002/bimj.4710220305}.
#' @seealso Schouten correction is based upon \insertCite{Schouten1980-kd;textual}{tern}.
#'
#'
#' @keywords internal
Expand Down
2 changes: 1 addition & 1 deletion R/summarize_glm_count.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ h_glm_count <- function(.var,
#' @param .df_row (`data.frame`)\cr data set that includes all the variables that are called in `.var` and `variables`.
#' @param conf_level (`numeric`)\cr value used to derive the confidence interval for the rate.
#' @param obj (`glm.fit`)\cr fitted model object used to derive the mean rate estimates in each treatment arm.
#' @param `arm` (`string`)\cr group variable, for which the covariate adjusted means of multiple groups will be
#' @param arm (`string`)\cr group variable, for which the covariate adjusted means of multiple groups will be
#' summarized. Specifically, the first level of `arm` variable is taken as the reference group.
#'
#' @return
Expand Down
1 change: 0 additions & 1 deletion R/utils_checkmate.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#' @param na_level (`character`)\cr the string you have been using to represent NA or
#' missing data. For `NA` values please consider using directly [is.na()] or
#' similar approaches.
#' @param ... a collection of objects to test.
#'
#' @return Nothing if assertion passes, otherwise prints the error message.
#'
Expand Down
26 changes: 26 additions & 0 deletions inst/REFERENCES.bib
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,29 @@ @ARTICLE{Yan2010-jt
month = aug,
year = 2010
}


% The entry below contains non-ASCII chars that could not be converted
% to a LaTeX equivalent.
@ARTICLE{Schouten1980-kd,
title = "Comparing two independent binomial proportions by a modified chi
square test",
author = "Schouten, H J A and Molenaar, I W and Van Strik, R and Boomsma,
A",
abstract = "When using the chi square test to compare the proportions of
successes in two independent binomial samples, a new continuity
correction is proposed, which equals half the size of the
smaller sample. Exact computations of unconditional
tail‐probabilities, together with a theoretical argument, show
that this correction is more appropriate than the YATES
correction. This version of the chi square test is still
conservative, but less so, and as a consequence more powerful,
than the YATES corrected test.",
journal = "Biom. J.",
publisher = "Wiley",
volume = 22,
number = 3,
pages = "241--248",
year = 1980,
language = "en"
}
2 changes: 0 additions & 2 deletions man/assertions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/h_glm_count.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/h_prop_diff_test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 95158c9

Please sign in to comment.