You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' @param discount Name of parameter providing discount rate per cycle (string)
28
26
#' @param fname Export data to a .CSV file of this name, if given (character)
29
27
#' @returns Tibble of payoffs taken from the heemod model, by intervention and model timestep (`model_time`).
30
-
#'
28
+
#'
31
29
#' The field `vt` is calculated as `(1+i)^(1-model_time)`, where `i` is the discount rate per model timestep set in the *heemod* model through the parameter `disc_cycle`. This can be useful in 'rolling-up' payoff values to the timestep in which they were incurred.
32
-
#'
30
+
#'
33
31
#' An additional set of payoffs (identified with a "_rup" suffix) provides calculations of the payoffs as at the start of the timestep in which they were incurred, i.e. original payoff / `vt`.
#' Calculate present value for a payoff in a single cohort with dynamic pricing across multiple timepoints
25
-
#'
23
+
#'
26
24
#' Present value of a series of payoffs for a single given cohort, entering at given future time, allowing for dynamic pricing. This function is a wrapper for [dynpv()] restricted to evaluation of a single cohort.
27
-
#' @inheritParams dynpv
28
25
#' @seealso [dynpv()]
29
-
#' @returns A list `inputs`, `results` and `pv`.
30
-
#' The `inputs` list contains a list of the following parameters called with the function: `uptakes, payoffs, horizon, tzero, prices`, and `discrate`.
31
-
#' The `results` output is a "dynpv" object (created by [class_dynpv()]) that contains the following elements:
32
-
#' - `name`: Name given to the object
33
-
#' - `df`: Tibble of calculation results
34
-
#' - `ncoh`: Number of cohorts of uptaking patients (always 1)
35
-
#' - `ntimes`: Number of times (unique values of tzero) at which calculations are performed
36
-
#' - `uptake`: Total number of uptaking patients (always 1)
37
-
#' - `total`: Total present value
38
-
#' - `mean`: Average present value per uptaking patient (=total/uptake)
39
-
#' - `sum_by_coh`: Tibble of summarized calculation results for each uptake cohort
40
-
#' - `inputs`: list contains a list of the following parameters called with the function: `uptakes, payoffs, horizon, tzero, prices`, and `discrate`.
41
-
#' The `pv` output is numeric, a convenience value equal to `$results$mean`.
0 commit comments