On Jun 10, 2020, at 3:26 PM, Bill Bane
Hi -- this little write-up attached may help describe how linear regression
can be performed on nonlinear data. Of course we need to be careful of
overfitting or extrapolating models using higher-order terms like this, but
for well-contained data sets, it can work satisfactorily.
For reference, here is the synthetic data:
Nice. I’ve been doing some verifying of this in R and it seems to hold up.
Estimate Std. Error t value Pr(>|t|)
(Intercept) -94.215687 33.590877 -2.805 0.00735 **
X -48.130120 5.647738 -8.522 5.09e-11 ***
X2 -0.066272 0.255958 -0.259 0.79685
X3 0.021859 0.003301 6.622 3.37e-08 ***
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 54.98 on 46 degrees of freedom
Multiple R-squared: 0.9707, Adjusted R-squared: 0.9688
F-statistic: 507.8 on 3 and 46 DF, p-value: < 2.2e-16
With the X value higher orders included regression seems able to adjust things to get a
good linear model.
This might work well for the OP to determine coefficients.
In my case I was more trying to determine degree, which ended up being around 14 if I
Maybe a small matter of doing some looping with yours to determine best fit, it might make
a good optional check against mine.