I'm trying to write some code to do a regression on data weight (x) and time (y). As best as I can tell, the model should be y = b1 + b2ln(x), but I don't know how you can do this by hand (I know how to in R…). I know how to do a simple linear regression by hand. Appreciate it.
Solved – Logarithmic Regression by hand
nonlinear regressionregression
Best Answer
You say that you'd calculate the slope as follows:
So imagine you have a set of x-values and y-values:
Step 1:
calculate a new $x$, $x_1 = \ln(x)$
Now regress $y$ on this new $x_1$ as usual