Skip to contents

All functions

NHSRtt
NHSRtt: A package for modelling waiting times using a stock and flow method
apply_params_to_projections()
Apply the parameters for renege and capacity (by months waited) to projections of capacity and referrals. If needed, or if validating your parameters, include the observed incomplete pathways by the number of months waited for the period prior to the period being projected (eg, a starting position)
calculate_incompletes()
Calculate the number of incomplete pathways in a bin from the inflow, reneges and treatments. Following the calculations, apply an optional redistribution of the occasions where incompletes are negative (eg, more treatments have been performed than there were people).
calculate_timestep_transitions()
Calculates the flow from each stock at each timestep
calibrate_capacity_renege_params()
calculate the capacity and renege parameters over the period of data per month waited
convert_months_waited_to_id()
convert the string version of months waited to the numeric id version
create_dummy_data()
Create a set of dummy data to put through the functions of the package
get_rtt_data()
Download and tidy the referral to treatment data from the NHS Statistics webpage
month_attribution_lkp()
creates table of weights to apply to dates that represent the end of a week. These weights correspond tot he proportion of that week's counts that fall into the month that the "week end date" occurs, and the proportion of the counts that fall into the previous month
obtain_links()
Identify links within a given url
optimise_capacity()
Optimise the capacity profile for projections
redistribute_incompletes_evenly()
Redistribute cases where there are more treatments and reneges than people in a particular bin for a particular period. This function chooses the redistribute the surplus treatment to the people waiting the longest first
redistribute_incompletes_optimally()
Redistribute cases where there are more treatments and reneges than people in a particular bin for a particular period. This function chooses the redistribute the surplus treatment to the people waiting the longest first
tidy_file()
Read in and tidy the csv file