0
$\begingroup$

enter image description here

I'm trying to find a least squares fit for the data above. When I plotted the data, I got enter image description here

Which doesn't look very linear. Any tips for how to go about finding a least squares fit for this data? I can't seem to find any nice formulas online, like the ones that exist for linear least squares fit.

$\endgroup$
3
  • $\begingroup$ Here is what WA finds. If you fit to an exponential, it looks bad. $\endgroup$
    – Moo
    Jan 22, 2017 at 21:24
  • $\begingroup$ Wow did not know that you could do that. I got the same equation for the linear least squares fit. Do you think that the linear equation is sufficient? $\endgroup$ Jan 22, 2017 at 21:28
  • $\begingroup$ It looks pretty good, but I would try an interpolating polynomial to see if it provides something better, but it may not. $\endgroup$
    – Moo
    Jan 22, 2017 at 21:34

1 Answer 1

0
$\begingroup$

Agree with @Moo's comment. Note that the linearity in linear least squares is w.r.t the parameters and not the variables. As such, you can fit plenty non linear models with it. Specifically your data looks pretty linear in $x$ as well. So I would go with maximum second order polynomial fit, i.e., $$ y=\beta_0+\beta_1x+\beta_2x^2+\epsilon. $$ If you don't have a good theoretical reason to use non-linear fit, I would not bother to use it.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .