# Thread: Urgent! Parameter fitting;Reed-Frost

1. ## Urgent! Parameter fitting;Reed-Frost

The following equation is a function for parameterfitting in the Reed-Frost epidemiological

model, but acquaintance with the model is not a necessity, i just need help in figuring out

how to approximate the parameter q in the following equation:

(sum (from t=0 to n-1) of C(t)C(t+1)q^C(t)/q(1-q^C(t)))-(sum (from t=0 to n-1) of

C(t)S(t+1)/q = 0

where C(t) and S(t) are discrete functions

The equation can also be seen in the following link:
www.akira.ruc.dk/~pgoetze/reedfrost.html

You can contact me, pgoetze@ruc.dk, if you are unsure how to interpreat the equation.

Matlab and maple are at my disposal.

If you know a method for solving this problem i would be really greatful!

Ps.
This question is posted in other areas of this forum because i do not know the category of the problem, sorry!

2. Hello -

this is just a nonlinear equation for q. Thus it can be solved numerically with any derivative free rootfinding method, e.g. with the bisection method (the simplest choice) or with Brent's method. The latter is implemented in Matlab as fzero.m, see documentation .

Note that you can multiply the entire equation with q, then the second sum does not depend on q.

Hope this helps!

3. ## Thank you very much!

Thank you hpe, it was a great help, helped our project procede!