I am wondering if it is possible to adapt the function $$y=a\cdot \ln(x)+\frac{b}{x}+x$$ by a linear regression to fit experimental data? If yes, how could this be done?
Thank you!
I am wondering if it is possible to adapt the function $$y=a\cdot \ln(x)+\frac{b}{x}+x$$ by a linear regression to fit experimental data? If yes, how could this be done?
Thank you!
On
Yes, it is OK. The requirement is to have the function you are estimating "linear in parameters" - your parameters are $a$ and $b$ (and perhaps $c$ if you have forgotten it but it works without it as well) and these parameters enter the function in a linear fashion: $y = a\cdot f_1(x)+b\cdot f_2(x) + f_3(x).$
As far as terminology is concerned, I would say that this is still called "linear regression".
It might be instructive to think about a function that would not be linear in parameters. For instance, $y=\frac{1}{a\cdot x + b}.$ In this regression function, we can't neatly separate the parameters and so can't use linear regression.
How to estimate your function? $y-x=a*log(x)+b*\frac{1}{x}$ and run OLS in some program without intercept ($y-x$ will be dependent variable, $log(x)$ is one independent and $\frac{1}{x}$ is second independent variable).
You can use linear methods if you are willing to fit a multivariate linear regression:
Let Y=ln(x), Z=1/x, X=x, then your equation becomes:
f(X,Y,Z) = aY + bZ + X; as you can see, it has a linear form.
Now, you just calculate X, Y, Z and fit a multivariate normal to the data.
The downside is that your "independent" variables are not really independent, so you may have multicolinnearity. You can calculate the correlations between each pair of variables, e.g., Corr(X,Y), Corr(Y,Z), Corr(X,Z), to verify that your variable are sufficiently linearly independent. If not, you will have one of your variables have an elevated standard error, and hence may"drop out" as it will not offer enough information to justify its inclusion. If so, remove one of them and refit.
Anyway, that's one possible way to use a linear model to fit your data. You can also just use a brute force "least squares" numerical algorithm to directly select parameters that minimize sum of squared error.