Hi everyone,

I've been having a hard time trying to do the following and would really appreciate some guidance:

Let's assume I have a function f given by the formula below that I want to use with nls to perform a non-linear regression analysis:

where *P_i (t)* is a non-linear function (in my case an exponential) with parameters *a, b and c* that I want to know from the regression.

How can I implement the summation to perform the regression analysis? I'm using the nls package but I'm open to change if there is a better one for this use case that I am not aware of.