
Fitting a simple viral infection model with 2 types of drug mechanisms to influenza data
Source:R/simulate_fludrug_fit.R
simulate_fludrug_fit.RdThis function fits the simulate_virusandtx_ode model, which is a compartment model using a set of ordinary differential equations. The model describes a simple viral infection system in the presence of drug treatment. The user provides initial conditions and parameter values for the system. The function simulates the ODE using an ODE solver from the deSolve package.
Usage
simulate_fludrug_fit(
U = 1e+07,
I = 0,
V = 1,
dI = 1,
dV = 2,
b = 0.002,
blow = 0,
bhigh = 100,
p = 0.002,
plow = 0,
phigh = 100,
g = 0,
glow = 0,
ghigh = 100,
k = 0,
fitmodel = 1,
iter = 1
)Arguments
- U
: initial number of uninfected target cells : numeric
- I
: initial number of infected target cells : numeric
- V
: initial number of infectious virions : numeric
- dI
: rate at which infected cells die : numeric
- dV
: rate at which infectious virus is cleared : numeric
- b
: rate at which virus infects cells : numeric
- blow
: lower bound for infection rate : numeric
- bhigh
: upper bound for infection rate : numeric
- p
: rate at which infected cells produce virus : numeric
- plow
: lower bound for virus production rate : numeric
- phigh
: upper bound for virus production rate : numeric
- g
: unit conversion factor : numeric
- glow
: lower bound for unit conversion factor : numeric
- ghigh
: upper bound for unit conversion factor : numeric
- k
: drug efficacy (between 0-1) : numeric
- fitmodel
: fitting model 1 or 2 : numeric
- iter
: max number of steps to be taken by optimizer : numeric
Value
The function returns a list containing the best fit timeseries, the best fit parameters, the data and the AICc for the model.
Details
A simple compartmental ODE models describing an acute viral infection with drug treatment mechanism/model 1 assumes that drug treatment reduces rate of new cell infection. mechanism/model 2 assumes that drug treatment reduces rate of new virus production.
Warning
This function does not perform any error checking. So if you try to do something nonsensical (e.g. specify negative parameter or starting values), the code will likely abort with an error message.