Optimise the capacity profile for projections
optimise_capacity.Rd
Optimise the capacity profile for projections
Usage
optimise_capacity(
t_1_capacity,
referrals_projections,
incomplete_pathways,
renege_capacity_params,
target,
target_bin,
tolerance,
max_iterations = 50
)
Arguments
- t_1_capacity
numeric; a single value for the capacity for the first time period
- referrals_projections
numeric; a vector for the number of referrals for each period in the projected time period
- incomplete_pathways
tibble; two column data frame or tibble, with fields called months_waited_id (taking values 0 to the maximum months waited group of interest), and incompletes (the count of the number of incomplete pathways) representing the count of incomplete pathways at timestep 0 (to initialise the model with)
- renege_capacity_params
tibble; three column data frame or tibble, with fields called months_waited_id (taking values 0 to the maximum months waited group of interest), and fields called capacity_param and renege_param, which are outputs from the function
calibrate_capacity_renege_params()
- target
string length 1; can be either a percentage point change, eg, "~-5%" or a percent value, eg, "5%"
- target_bin
numeric length 1; the bin that the target refers to. It must be less than or equal to the max_months_waited value
- tolerance
numeric length 1; the tolerance used to compare the absolute error with in the max_months_waited bin to determine convergence. The absolute error is calculated on the proportion in the max_months_waited bin relative to the total waiting (even if a non-percentage target is used)
- max_iterations
numeric; the maximum number of iterations to test for convergence before providing a warning and an invalid number