Question: Error in NLPSolve and recursion for parameter fitting of an ODE

Hello to whomever this may concern. I am curently trying to estimate parameters and initial conditions for a system of ODEs. I have taken inspiration from the code given by Robert J. Lopez. I am having issues with minimizing the SSE (sum of squared errors) which I named as a procedure using the NLPSolve command from the Optimization package. It returns an error saying there are too many levels of recursion, which I do not understand where it is coming from or how to solve the issue and I was hoping to get an explination on how to solve it.

Below is the code up until the error. Any help or guidance would be greatly appreciated.

Parameter_estimation.mw

Please Wait...