1
$\begingroup$

I have built a log-log regression model, which is going to be used for prediction purposes. However, after applying the model to my data and obtaining predictions, the model drastically under-predicts. I understand that this is due to the multiplicative errors in the log-log model, since:

$\log(y)=log(\alpha) + \beta log(x) + \epsilon$

Which gives

$y = \alpha x^\beta \exp(\epsilon)$

Therefore, the errors increase as the value increases (more explanation around this would also be beneficial to me, also). So, I have used a non-linear model instead, which was built using:

$y = \alpha x^\beta + \epsilon$

However, I have now read that instead of changing to a non-linear model, I possibly should have used something called "smearing", for the back transformation of my predicted $y$ values. If this is the case, then how would I go about implementing this?

I don't want to discount the log-log model if this would have worked perfectly well once the smearing had been applied.

Just a bit of background about my data: I am modelling a households electricity usage between a specific time period of the day, based on their household size. Each set of data is close to normal once the $\log$ transformation is applied, but still fails the normality testing. The reason I have discounted the log-log model (the way that I have used it) so far, is because I am only interested in the sum of the predictions. Therefore, since I have so far only been given under-predictions, I have investigated the NLS methods. This is better, but I want to exhaust all options with the log-log before deciding on a final model.

EDIT:

I have read online, that the way to correct the back-transformation is to use the following equation:

$y = \exp(\alpha + \beta\log(X) + 0.5\sigma^2)$,

Where $\epsilon \sim N(0, \sigma^2)$. However, I am unclear as to where the $0.5\sigma^2$ comes from. I have also read that the 'correction' factor should be the mean of the exponential of the residuals. Which is it? They both lead to very different answers, and I don't understand where either come from.

$\endgroup$
6
  • 1
    $\begingroup$ Not a full answer, but a good starting place would be to search "Duan's Smear" (and variations on that) on this site as well as more broadly. $\endgroup$
    – Upper_Case
    Jan 17, 2017 at 15:54
  • $\begingroup$ Thank you. I have calculated the mean of my residuals, using mean(residuals(fit)) where fit is my linear model, I get a mean of 10.3. This is very high and does not sort out my model. Am I doing something wrong? $\endgroup$
    – sym246
    Jan 17, 2017 at 16:07
  • $\begingroup$ The calculation for the mean of residuals looks fine, assuming that nothing odd happened while fitting the model. Do you have reason to believe the mean residual is inaccurate, as opposed to just being inconvenient? As asides: do you believe there is a logarithmic relationship among regressors and regressands, or are you just shooting for "normality"? And I don't have time to run through the algebra just now, but it's always worth double-checking with logarithms. $\endgroup$
    – Upper_Case
    Jan 17, 2017 at 18:55
  • $\begingroup$ Thanks for your response. When I look at the distribution of the exponential of the residuals, the value of 10.3 looks reasonable, however multiplying my predicted values by this amount then taking the exponent gives values of around 1000 times larger than the actual values. In terms of my data, the log-log relationship has long been used to model these two variables, however normality testing does not conclude that the log transformation has achieved normality, using 95% CIs. I dont want to discount this log-log model if the bias correction would solve my problem, but cannot see how it works. $\endgroup$
    – sym246
    Jan 17, 2017 at 19:10
  • $\begingroup$ I don't understand why you are multiplying by the exponentiated error in your second equation, though it's possible it's too early where I am for my algebra to be very reliable. $\endgroup$
    – Upper_Case
    Jan 18, 2017 at 13:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.