Included Functions


SumFields()  Sums microscopy count dataframe across viewfields and determined fraction of parasite in each of the state

PlotByTime() Boxplots for each state by timepoint

PlotByExp()   Plots each kinetics for each experimental replicate

PredictKinetics() Solves a system of ordinary differential equations given the parameter vector and a set of initial conditions. To enforce positivity of the values for each state we use a log transformed system of ODEs and initial conditions for the ODE solver which is subsequently backtransformed.
We similarly enforced the positivity of the parameter space.

SumSqrResid() Calculates the residuals between data and model solution.
Residuals for each state can be weighted using the "weights" option.

FitModel() Minimized the SumSqrResid functions by a quasi-Newtonian gradient descent algorithm (BFGS) with maximum of 1000 iterations.

PlotModel()
Displays the Model solution ontop of the data to evaluate fit.

GlobalMin()
Fits Model repeatedly with random initial parameter guesses to ensure that FitModel found the global minimum ie optimal solution.