diff --git a/R/calc_dist_params.R b/R/calc_dist_params.R index 77676d1b8..e3dfdf201 100644 --- a/R/calc_dist_params.R +++ b/R/calc_dist_params.R @@ -116,42 +116,3 @@ calc_dist_params <- function(prob_dist, # return params prob_dist_params } - -#' Converts summary statistics to parameters of a probability distribution -#' -#' @description The summary_stats object needs to have a class attribute with -#' the name of the probability distribution in order for the correct conversion -#' function to be dispatched. -#' -#' @inheritParams new_epidist -#' @inheritParams epidist -#' -#' @return Named vector -#' @keywords internal -convert_params <- function(summary_stats, - prob_dist) { - params <- switch(prob_dist, - "gamma" = unlist( - gamma_meansd2shapescale( - mean = summary_stats$centre_spread$mean, - sd = summary_stats$centre_spread$sd - ) - ), - "lnorm" = unlist( - lnorm_meansd2meanlogsdlog( - mean = summary_stats$centre_spread$mean, - sd = summary_stats$centre_spread$sd - ) - ), - "weibull" = unlist( - weibull_meansd2shapescale( - mean = summary_stats$centre_spread$mean, - sd = summary_stats$centre_spread$sd - ) - ), - stop("No conversion functions for ", prob_dist, call. = FALSE) - ) - - # return params - params -}