Skip to content

Commit

Permalink
Further improving documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
damianooldoni committed Sep 8, 2022
1 parent 26aae2f commit e177025
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
7 changes: 4 additions & 3 deletions R/apply_decision_rules.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@
#' @importFrom rlang sym !! :=
#' @importFrom stats median
#' @details
#' Based on the decision rules output we define the emergency status value:
#' Based on the decision rules output we define the emergency status value,
#' `em`:
#' - `dr_3` is `TRUE`: `em = 0` (not emerging)
#' - `dr_1` and `dr_3` are `FALSE`, `dr_2` and `dr_4` are `TRUE`: `em = 3`
#' (emerging)
#' - `dr_2` is `TRUE`, all others are `FALSE`: `em = 2` (potentially emerging
#' - `dr_1` is `TRUE` and `dr_3` is `FALSE` or `dr_1`, `dr_2` and `dr_3` is
#' `FALSE`: `em = 1` (unclear)
#' - (`dr_1` is `TRUE` and `dr_3` is `FALSE`) or (`dr_1`, `dr_2` and `dr_3` are
#' `FALSE`): `em = 1` (unclear)
#' @examples
#' \dontrun{
#' df <- tibble(
Expand Down
10 changes: 6 additions & 4 deletions R/apply_gam.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@
#' We use `[mgcv::nb()]`, a negative binomial family to perform the GAM.
#'
#' The smoothing parameter estimation method is set to REML (Restricted maximum
#' likelihood approach).#' If all smoothers "GAM output cannot be used: p-values of all GAM smoothers
#' are above {p_max}" where p_max is the P-value used as threshold and
#' defined by argument `p_max`.
#' likelihood approach). If the P-value of the GAM smoother(s) is/are above
#' threshold value `p_max`, GAM is not performed and the next warning is
#' returned: "GAM output cannot be used: p-values of all GAM smoothers are above
#' \{p_max\}" where `p_max` is the P-value used as threshold as defined by
#' argument `p_max`.
#'
#' If the `mgcv::gam()` returns an error or a warning, the following message is
#' returned to the user: "GAM ({method}) cannot be performed or cannot
#' returned to the user: "GAM (\{method_em\}) cannot be performed or cannot
#' converge.", where `method_em` is one of `"basic"` or `"correct_baseline"`.
#' See argument `baseline_var`.
#'
Expand Down
12 changes: 12 additions & 0 deletions man/apply_decision_rules.Rd

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

10 changes: 6 additions & 4 deletions man/apply_gam.Rd

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

0 comments on commit e177025

Please sign in to comment.