0

I have the following data:

x: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

y: 22 36 42 51 57 64 68 71 75 79 85 87 88 91 94 97 99 99 103 104 105 107 108 109 111

I want to fit the data in the following equation using non-linear least square method.

$y=a \times \frac{x}{2.511886432} \times \text{ln}\left(\frac{128}{x} + b\right)+c$

How can I solve it mathematically to determine the best fit values of coefficients? Using the matlab curve fitting tool that follows the trust region algorithm, I got the following values of a, b and c:

a=6.803 b=-0.94 c=12.45

Any help will be highly appreciated. Thanks.

J Cian
  • 21

1 Answers1

0

The model is nonlinear because of the $b$ parameter. So, suppose that you fix it to an arbitrary value; the model is then linear and linear regression will give you $a(b)$, $c(b)$, $SSQ(b)$. Plot $SSQ(b)$ as a function of $b$ and look for the minimum (refine as long as you wish).

Another solution is to use the analytical expressions of $a(b)$ and $c(b)$, and to consider the function $SSQ(b)$ to be minimized with respect to $b$.

  • Can you please show me some mathematical steps? As I am new to optimization, I am finding it difficult to solve. – J Cian Sep 23 '15 at 14:08
  • 1
    For a given value of $b$, define $z= \frac{x}{2.511886432} \times \text{ln}\left(\frac{128}{x} + b\right)$ and the linear regression is $y=az+c$ – Claude Leibovici Sep 24 '15 at 04:47