Skip to content

Commit

Permalink
Remove tune_inv_gamma function after deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam authored and sbfnk committed Mar 4, 2024
1 parent 8b9cee6 commit 9d7c28d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 60 deletions.
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.

0 comments on commit 9d7c28d

Please sign in to comment.