Topic: Logistic trendline

Is it possible to make a logistic trendline?

Re: Logistic trendline

I am a little unsure what you want. As far as I know a logistic function always have the formula f(x)=1/(1+e^-x). But if you change it a little you can for example create f(x)=$a/($b+e^-x) as a model for a custom trendline.

Re: Logistic trendline

I have a problem with this. I have tried to put in the function f(x)=$a/(1+$b*exp(-$c*x)), (which is the form our curriculum applies for the logistic model), but I only get f(x) = 1/(1+e^-x) as result.

Re: Logistic trendline

It is most likely because that is the best result Graph can find, but I can check what happens if you post your data points.

Re: Logistic trendline

I used the following datapoints, picked from an example in our book:
x    y
0    10
10    18
20    38
30    64
40    90
50    110
60    118

I also tried to change the constants, but it didn't affect the result, unless I chose $a or $c=0, then it wouldn't find any result.

Re: Logistic trendline

It looks like the default guess of $a=1, $b=1, $c=1 seems to be too far away from the points for Graph to use it. If you change the guess to $a=100, $b=10, $c=1 it seems to work.

I hope to improve this in the future so Graph can provide the initial guess.

Re: Logistic trendline

Thanks, good to know that it actually works. But it would be nice if you could implement an error message when R^2>1, and ask the user to change the initial values to obtain a more reliable result. It's better to get no result than getting wrong result...

Re: Logistic trendline

I will consider it. But sometimes it is difficult to determine the difference between a wrong result and a model that just doesn't fit the data very well. But I think I can at least give a warning.

9 (edited by k-ryeng 2010-06-26 21:08:41)

Re: Logistic trendline

When the R^2>1, something is wrong, so that should at least be one test criterion...