Skip to content

Commit

Permalink
Changing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
SofiaOtero committed Nov 1, 2024
1 parent 90371df commit 4cdcae3
Show file tree
Hide file tree
Showing 12 changed files with 431 additions and 393 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export(autoplot)
export(epi_calendar)
export(fit_growth_rate)
export(fit_quantiles)
export(seasonal_burden_levels)
export(tsd)
importFrom(ggplot2,autoplot)
importFrom(grDevices,devAskNewPage)
Expand Down
80 changes: 0 additions & 80 deletions R/compute_relative_dist_intensity_levels.R

This file was deleted.

10 changes: 5 additions & 5 deletions R/fit_quantiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#' - 'conf_levels': The conf_levels chosen to fit the quantiles.
#' - 'quantiles': The quantile results from the fit.
#' - 'par': The fit parameters for the chosen family.
#' - par[1]:
#' - par_1:
#' - For 'weibull': Shape parameter (k).
#' - For 'lnorm': Mean of the log-transformed observations.
#' - For 'exp': Rate parameter (λ).
#' - 'par[2]':
#' - 'par_2':
#' - For 'weibull': Scale parameter (λ).
#' - For 'lnorm': Standard deviation of the log-transformed observations.
#' - For 'exp': Not applicable (set to NA).
Expand Down Expand Up @@ -54,10 +54,10 @@
#' )
#'
#' # Use the model
#' fit_quantiles(weighted_observations = data_input,
#' quantile_results <- fit_quantiles(weighted_observations = data_input,
#' conf_levels = c(0.50, 0.90, 0.95),
#' family = "weibull")

#' print(quantile_results)
fit_quantiles <- function(
weighted_observations,
conf_levels = c(0.50, 0.90, 0.95),
Expand Down Expand Up @@ -136,7 +136,7 @@ fit_quantiles <- function(
# Create return fit parameters
return(list(
conf_levels = conf_levels,
quantiles = as.numeric(quantiles),
values = as.numeric(quantiles),
par = list(par_fit[1], ifelse(length(par_fit) == 2, par_fit[2], NA)),
obj_value = optim_obj$value,
converged = optim_obj$convergence == 0,
Expand Down
111 changes: 0 additions & 111 deletions R/intensity_levels.R

This file was deleted.

Loading

0 comments on commit 4cdcae3

Please sign in to comment.