Post Reply 
(35S) Linearized S-Curve (Logistic Curve) Regression
03-12-2018, 09:55 AM (This post was last modified: 03-12-2018 12:26 PM by Dieter.)
Post: #2
RE: (35S) Linearized S-Curve (Logistic Curve) Regression
(03-12-2018 04:08 AM)gerry_in_polo Wrote:  HP-35s Program - Linearized S-Curve (Logistic Curve) Regression (Gerardo V. Lozada, M.S., P.E.E., HP-35s, 2018-03-10)

First of all: thank you very much for a useful program.
I hope you do not mind a few remarks and corrections that will make the program work as intended. ;-)

(03-12-2018 04:08 AM)gerry_in_polo Wrote:  Linearizes the Logistic Function (S-Curve) so that linear regression may be performed on historical data.

S = F/(1+b*e^(-b*T))

This probably should read

S = F / (1+b*e^(–c*T))

(03-12-2018 04:08 AM)gerry_in_polo Wrote:  Historical Data Input Routine
S001 LBL S
S002 CLΣ
S003 INPUT F
S005 INPUT S
S006 RCL F
S007 ÷
S008 1
S009 -
S010 LN
S011 INPUT T
S012 Σ+
S013 STOP
S014 GTO S004

There is no line S004 where the last step could jump to. Also the variable transformation (linearization) seems to be wrong. I think there is only an X<>Y missing which would explain both problems:

S = F / (1+b*e^(–c*T))
<=>
ln(F/S – 1) = ln b + (–c)*T

So it has to be F/S instead of S/F:

Code:
S001 LBL S
S002 INPUT F
S003 CLΣ
S004 INPUT S
S005 RCL F
S006 X<>Y    <= missing line
S007 ÷
S008 1
S009 -
S010 LN
S011 INPUT T
S012 Σ+
S013 GTO S004

Notes: The STOP after the Σ+ was removed as it is not required – the program directly jumps back to the S prompt. And the CLΣ was placed after the INPUT to avoid clearing the Σ registers if the program is inadvertedly run.

I finally tried another version that adds a Σ– function for removing erroneous data and has the user enter the data pairs via T [ENTER] S which is faster than separate prompts for both values.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (35S) Linearized S-Curve (Logistic Curve) Regression - Dieter - 03-12-2018 09:55 AM



User(s) browsing this thread: 1 Guest(s)