I was given the following assignment:
I have to find the discrete least squares approximation for a given data set using a model of the form:
$\ f(x) = 1/(Ax + 1/B)² $.
I tried to find the normal equations by taking the partial derivatives of the error function with respect to A and B and equating them to 0, but I seemed to be getting nowhere.
I also thought about raising to the power of $-1/2 $ both the approximating function and the data points to convert this into a simple linear regression problem, but that wouldn't yield the least squares approximation for the original problem, wouldn't it? It would be something that parallels what you do when you have to fit a model of the form $\ y=a*e^{bx} $.
I would be very grateful if someone gave me some guidance in regards to how to tackle this problem.
You have $n$ data points $x_i,y_i$ and you want to fit the model $$y=\frac 1 {\left(A x+\frac 1 B\right)^2}$$ which is non linear with respect to both parameters; this means that you will need to perform nonlinear regression which implies that you have "reasonable" estimates.
First, let $C=\frac 1 B$ and now linearize the model as $$\frac 1 {\sqrt y}=A x +C$$ So, in this preliminary step define $z_i=\frac 1 {\sqrt y_i}$ and a trivial linear regression will give good estimates of $A,C$.
But, you need to continue with a nonlinear regression since what is measured is $y_i$ and not any of its possible transforms.
Otherwise you need to solve $$\frac{\partial SSQ}{\partial A}=\sum_{i=1}^n\frac{x_i \left(\frac{1}{(A x_i+C)^2}-y_i\right)}{(A x_i+C)^3}=0$$ $$\frac{\partial SSQ}{\partial C}=\sum_{i=1}^n\frac{\left(\frac{1}{(A x_i+C)^2}-y_i\right)}{(A x_i+C)^3}=0$$ which could easily be done using Newton-Raphson methods with numerical derivatives; since you have ood estimates, this should converge in very few iterations.