jon, thanks for the feedback. I originally wrote the function for a non-uniformly spaced time vector, which conv would not handle correctly. That said, I expect most uses of this function will be for uniformly spaced time vectors, where your criticism is exactly right.

I uploaded an update that will look to do the convolution unless the spacing is variable, in which case it will use the (ugly) loop.

Andrew, I spent some time looking at it, and think I have fixed the problem. I just uploaded a newer version. Once it is up, please try your dataset on it and let me know how it goes.

Sorry about the plotting calls. I realized that I forgot to remove them just after resubmitting. I guess the follow up submission with those removed is still moving though the system.

Good catch on reversing t. It is one of those bugs introduced when addressing a different problem. I'll fix that bug and put a test example in the help comments in new submission later today.

Thanks for the feedback, Darren. I've made a fix based on your idea of rescaling the vector internally, and submitted an update. It isn't completely obvious to me why Qpre goes to the mean of Q for some scalings of t. In any case, I hope my fix is general and not limited to your special case. Keep me posted.

I suspect the problem Rita and Michael were having is that their data describes a decreasing logistic and the program is set up to do an increasing logistic. I just uploaded a non-GUI fit_logistic function and at first it failed with Rita's data, too. Fortunately, it is an easy fix by making the time series negative.

jon, thanks for the feedback. I originally wrote the function for a non-uniformly spaced time vector, which conv would not handle correctly. That said, I expect most uses of this function will be for uniformly spaced time vectors, where your criticism is exactly right.

I uploaded an update that will look to do the convolution unless the spacing is variable, in which case it will use the (ugly) loop.

Andrew, I spent some time looking at it, and think I have fixed the problem. I just uploaded a newer version. Once it is up, please try your dataset on it and let me know how it goes.

Great function, thank you. I too have the issue with outputting a constant value for Qpre, and, as with Darren, changing the scaling of the value for t fixes this. My t values scale between 0 and 1 in steps of 0.001.

jon, thanks for the feedback. I originally wrote the function for a non-uniformly spaced time vector, which conv would not handle correctly. That said, I expect most uses of this function will be for uniformly spaced time vectors, where your criticism is exactly right.
I uploaded an update that will look to do the convolution unless the spacing is variable, in which case it will use the (ugly) loop.

Andrew, I spent some time looking at it, and think I have fixed the problem. I just uploaded a newer version. Once it is up, please try your dataset on it and let me know how it goes.

Comment only

10 Feb 2014

Logistic curve fit
Fit a time series to a best-fitting logistic function.

James,
Great function, thank you. I too have the issue with outputting a constant value for Qpre, and, as with Darren, changing the scaling of the value for t fixes this. My t values scale between 0 and 1 in steps of 0.001.
Many thanks

Comment only