I am trying to do exponential regression by matrix notation, and I am trying to figure out to create my $\mathbf{X}$ matrix to fit my model. I know that I need to use a model function of the form $c_1 t e^{c_2 t}$ and the data that I'm given is a vector of $\mathbf{y}$ values and a vector of $\mathbf{t}$ values.

Browsing, I've been able to find this way of estimating the exponential regression model of the form $ y = c_1 e^{c_2 t}$ by taking the log such that $log(y) = log(c_1)+c_2 t$, letting the best fitted values be a and b such that $c_1 = exp(a)$ and $c_2 = b$. See here for quick reference from Wolfram.

I've gotten this far for my model form: $log(y) = log(c_1) + c_2*t + log(t)$. Is this right? If so, how do I estimate coefficients/best fitted values and then translate them back to $c_1$ and $c_2$?

  • $\begingroup$ You cannot really mean equality in your equations involving $y$. $\endgroup$
    – Glen_b
    Dec 12, 2015 at 6:59
  • $\begingroup$ Could you clarify your statement? I'm trying to understand the Wolfram posting. $\endgroup$
    – kathystehl
    Dec 14, 2015 at 19:24
  • $\begingroup$ if you truly mean that $\log(y) = \log(c_1)+c_2 t$ then the points $(\log(y),t)$ all lie exactly on a line and two observations on $y,t$ will identify $c_1,c_2$ exactly. Therefore you mean something else (the wolfram page you point to makes the same error and they should know better). It's the way the error term comes in (in several senses) that will determine how to answer your question. There are many ways to fit an exponential regression but they assume different things. $\endgroup$
    – Glen_b
    Dec 14, 2015 at 22:01

1 Answer 1


There are several issues here.

One is the absence of the error term (does it enter additively? is it assuming constant spread on the original scale or the log scale, or something else?).

That issue is discussed briefly here and here.

Assuming the error term is multiplicative (additive in the logs) and at least not too far from constant variance on the log scale, then using linear regression to fit the model on the log scale may be reasonable. This is the approach in the page you link to.

The second issue is arriving at predictions.

Under the abovementioned assumptions, your transformed model is right.

You fit it by subtracting $\log t$ from both sides. Let $z=\log(y)-log(t)$ and fit $E(z)=\alpha+\beta t$ via regression.

Then an estimate of $c_1$ would be $\exp(\hat{\alpha})$ and an estimate of $c_2$ would be $\hat{\beta}$.

What constitutes "best" fitted values depends on what you mean by "best". If the errors are near symmetric on the log scale, exponentiating the log fit (not forgetting to add $\log(t)$ back in) will result in a median forecast on the original scale (under the variance assumption I mentioned before, prediction intervals transform back without an issue).

If you want something nearer to a mean forecast, simply exponentiating the fit on the log scale will be biased. This may not be much of an issue if the noise on the log-scale is very small. It's possible to roughly correct for the bias using a correction derived from a Taylor expansion, or by assuming normality on the log-scale and multiplying the median prediction by $\exp(\frac12 \hat{\sigma}^2)$, assuming the sample size is large enough that the uncertainty in the estimate of $\hat{\sigma}^2$ may be ignored.

Another approach would be to fit a gamma GLM with log link to the untransformed $y$ (and with the $\log(t)$ term as an offset) and then the model gives mean predictions directly without any need to worry about bias due to the non-linear transformation.


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.