Solve SquIP
solve_SquIPz.RdThis function solves the model SquIP. It is a wrapper around the derivatives function dSquIP that calls deSolve::ode. The wrapper does the following:
N— set a value for the truncation parameter, if no value was passedy— set up the the initial values vector as a named vectortimes— set up a mesh over the independent variable \(a\) (age, in days)parms— set up a named vector with the parameter values
After solving the equations, it parses the outputs, and returns the values of the dependent variables by name. The wrapper
Usage
solve_SquIPz(
h,
F_a,
F_moe,
bday = 0,
r = 1/200,
rho = 0.2,
sigma = 1/365,
xi = 1/365,
eta = 1/25,
mu = 0,
H = 1000,
Amax = 730,
da = 1,
N = NULL
)Arguments
- h
the force of infection
- F_a
a trace function
- F_moe
a probability moment function for the multiplicity of exposure
- bday
the cohort birthday
- r
the clearance rate for a simple infection
- rho
the fraction of incident cases that gets treted
- sigma
treatment rate for infected individuals
- xi
background drug taking
- eta
loss of chemoprotection
- mu
population death rate
- H
the cohort size
- Amax
The maximum runtime (in days)
- da
The output interval (in days)
- N
truncation parameter (maximum MoI): if
NULL, then set by rule
Value
a named list of parsed outputs
Parased Outputs
After solving the equations, the solutions are parsed and returned as a named list:
age— the ages at which the dependent variables were outputS— Susceptible, a vectorP— Chemoprotected, a vectorIi— Infected \(\times\) MoI, a matrixH— Cohort population sizem_1— The hybrid variable \(m_1\), mean MoIm_2— The hybrid variable \(m_2\), the second moment of the MoIm1— The mean MoI, computed fromIim2— The second moment of the MoI, computed fromIix— The prevalence of infection: \(x = (H-P-S)/H\)F_r— The rate of natural clearance: \(r I_1\)N— The truncation parameterout— The matrix returned bydeSolve