All functions

AR2PR()

Calculate the prevalence rate and treatment rate for a given attack-rate, model, and set of model parameters

AR2PRopt()

Helper function for finding the maximum prevelance for a given model and set of paramaters

PR2AR()

Master function for converting prevalence rates into attack-rates

PR2AReq()

Finds the equilibrium attack-rates for an input vector of prevalences, conditional on the chosen model and parameters

aggAR()

Aggregates attack-rates from time step to annual

findAXmax()

Finds the maximum prevalence and associated attack-rate for a given model and set of parameters

findYeq()

Calculates the equilibrium Y for a given attack-rate and model

fn()

Helper objective function for finding the optimal attack-rate for a given prevalence rate

fn2()

Helper objective function for finding a pair of optimal attack-rates for a given pair of starting prevalence rates when the model has an exposure class

interpRates()

Interpolate a vector of rates to match the model time step

makeB()

A function for making the matrix representation of the simple SIS model

makeBage()

A function for making the matrix representation of the age of infection (AoI) with overwriting superinfection

makeBdrugs()

A function for making the matrix representation of the simple model with drugs added

makeBdrugs_age()

A function for making the matrix representation of the age of infection (AoI) with overwriting superinfection and drugs

makeD()

Generic function for making the D matrix that maps the state vector, Y, to prevalence

makeV()

Generic function for making the W matrix associated an input B function and set of parameters

makeW()

Generic function for making the W matrix associated an input B function and set of parameters

optimA()

A function for finding the optimal attack-rate for a given prevalence rate

plotAR2PR()

Make plots showing the relationship between AR and PR for a number of different Tx levels

simAR()

Generic forward simulation function that can accomdate models with and without exposure classes