PolymathPlus Report
📊   Nonlinear Regression (L-M) 2022-04-01 12:49 

# Example 29 - Nonlinear Regression
# Pressure Data
# Verified Solution: A=5.76735, B=677.094, C=153.885
# Ref.: Comput. Appl. Eng. Educ. 6: 173, 1998

[
TC P
-36.7 1
-19.6 5
-11.5 10
-2.6 20
7.6 40
15.4 60
26.1 100
42.2 200
60.6 400
80.1 760
]

logP=log(P)

# nlinfit <y> = <f(x1,x2,x3,...,m1,m2,m3...)>
nlinfit logP = A-B/(C+TC)

# Initial guess of the regression model variables
m(A)= 8.752
m(B)= 2035
m(C)=273


logP = A-B/(C+TC)

Variable Initial guess Value 95% confidence
A 8.752 5.7673466 0.15208443
B 2035 677.09404 48.15906
C 273 153.88537 5.6870892

R^2   R^2adj   Rmsd   Variance  
0.9996879    0.9995987    0.0047228    0.0003186   

Nonlinear Regression Plot

 0 1 2 3 -1 0 1 2 3 4 logP y=x Line logP Calc




Nonlinear Regression Residuals Plot

 -0.04 -0.02 0 0.02 0.04 0.06 0 1 2 3 logP Zero Line logP - logPCalc




Source data points and calculated data points

  TC logP logP calc Delta logP
1 -36.7 0 -0.01062733 0.01062733
2 -19.6 0.69897 0.7251442 -0.02617419
3 -11.5 1 1.0119843 -0.01198433
4 -2.6 1.30103 1.2917386 0.00929143
5 7.6 1.60206 1.5744341 0.02762584
6 15.4 1.7781513 1.767627 0.01052429
7 26.1 2 2.0054074 -0.00540739
8 42.2 2.30103 2.3142893 -0.01325929
9 60.6 2.60206 2.6105158 -0.00845581
10 80.1 2.8808136 2.8736015 0.00721212

General

Algorithm LM
Sample size 10
Model vars 3
Indep vars 1
Iterations 24
Max iterations 64