What I have done so far

I have transformed a non-linear model

$$f(x)=\frac{C_1 \cdot a}{a^2 + C_2 \cdot x^2}$$

$a$: fitting parameter
$C_1, C_2$: Given constants

To a linear one: $$g(x')=\frac{a}{C_1}+\frac{C_2}{C_1a}x'$$

By setting $x'=x^2$, $g(x')=\frac{1}{f(x')}$

With parameters $b=\frac{a}{C_1}$ and $m=\frac{C_2}{C_1a}$.


My measurements are given as $f_i$ at positions $x_i$. And I want to perform a regression (LS) to find the parameter $a$ for the initial non-linear model:


where $c = [b,m]^T$ and $x_i=[1,f'_i]^T$.

The closed form solution would then be $c= \frac{ \sum\limits_{i=1}^N x_i \frac{1}{f_i}}{\sum\limits_{i=1}^N x_i x_i^T}$.

Am I allowed to do this transformation as I end up having 2 fitting parameters which both depend only on $a$? Further I don't know if I can use the transformation for fitting because what I really measure is $f$ and not $1/f$ and it will change the error structure.

  • $\begingroup$ Usually, $m$ is the slope & $b$ is the y-intercept. Also, you seem to have the same variable on both sides of your equation. Do you have a $y = f(x)$? $\endgroup$ Oct 30, 2015 at 15:11
  • $\begingroup$ Thanks for the note. In the second part I just apply the standard procedure to solve a linear system with LS in matrix form. The measured function values at positions $x_i$ (you call them $y$) are denoted by $f_i$. $\endgroup$
    – xphan
    Nov 3, 2015 at 8:03

1 Answer 1


You are correct about both of your concerns: transforming the response variable will change your error structure (which can be desirable or not, depending on how it was originally) and your linearization attempt did not really make the problem simpler. Since you have only one parameter that showed up in both the intercept and slope, you would have to fit some sort of constrained linear regression model, but the constraint is not linear ($b\times m = constant$), so it is not simple at all.

The solution is to give up linearization attempts, and just fit the model directly using, say, non-linear least squares if the errors are additive. In R the nls function would do it, in SAS you would use PROC NLIN, but for a one-parameter problem almost any optimization procedure would work.

  • 1
    $\begingroup$ Thanks alot for your input. The reason I've tried to linearize the model is that I'd prefer a closed form solution rather than an iterative method (I will probably implement it myself). Also, I will need to know a good inital guess for the parameters as it is a non-convex function. $\endgroup$
    – xphan
    Nov 3, 2015 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.