Skip to content

Change expected type of reported_cases argument to numeric #594

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

Merged
merged 5 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove tune_inv_gamma function after deprecation
  • Loading branch information
jamesmbaazam committed Mar 4, 2024
commit 0e40b27fcb554ec2520dae1e51f5a87e2c0d90e8
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export(stan_vb_opts)
export(summarise_key_measures)
export(summarise_results)
export(trunc_opts)
export(tune_inv_gamma)
export(update_horizon)
export(update_list)
export(update_secondary_args)
Expand Down
33 changes: 0 additions & 33 deletions R/dist.R
Original file line number Diff line number Diff line change
Expand Up @@ -796,39 +796,6 @@ sample_approx_dist <- function(cases = NULL,
return(mapped_cases)
}

#' Tune an Inverse Gamma to Achieve the Target Truncation
#'
#' @description `r lifecycle::badge("deprecated")`
#' Allows an inverse gamma distribution to be. tuned so that less than 0.01 of
#' its probability mass function falls outside of the specified bounds. This is
#' required when using an inverse gamma prior, for example for a Gaussian
#' process. As no inverse gamma priors are currently in use and this function
#' has some stability issues it has been deprecated.
#'
#' @param lower Numeric, defaults to 2. Lower truncation bound.
#'
#' @param upper Numeric, defaults to 21. Upper truncation bound.
#'
#' @return A list of alpha and beta values that describe a inverse gamma
#' distribution that achieves the target truncation.
#' @export
#'
#' @keywords internal
#'
tune_inv_gamma <- function(lower = 2, upper = 21) {
lifecycle::deprecate_stop(
"1.3.6", "tune_inv_gamma()",
details = paste0(
"As no inverse gamma priors are currently in use and this function has ",
"some stability issues it has been deprecated. Please let the package ",
"authors know if deprecating this function has caused any issues. ",
"For the last active version of the function see the one contained ",
"in version 1.3.5 at ",
"https://github.com/epiforecasts/EpiNow2/blob/bad836ebd650ace73ad1ead887fd0eae98c52dd6/R/dist.R#L739" # nolint
)
)
}

#' Specify a distribution.
#'
#' @description `r lifecycle::badge("stable")`
Expand Down
26 changes: 0 additions & 26 deletions man/tune_inv_gamma.Rd

This file was deleted.