Skip to main content

Timeline for Analysing transformed data

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Apr 13, 2017 at 12:44 history edited CommunityBot
replaced http://stats.stackexchange.com/ with https://stats.stackexchange.com/
Mar 17, 2013 at 14:06 comment added Andy W @DimitriyV.Masterov is correct, see a pretty straight forward discussion here on the Stata blog, Use poisson rather than regress; tell a friend. The expectation of the exponentiated error term is not one.
Mar 17, 2013 at 1:07 comment added gung - Reinstate Monica I'm sure it's me who's being dense here, @DimitriyV.Masterov (& it wouldn't be the first time... ). Setting aside whether $y_i$ has been transformed, we calculate $\hat y_i$ as $\beta_0+\beta_1x_i$; that is, we set $\varepsilon=0$, b/c $E[\varepsilon]=0$. Now $\exp(0)=1$, so we can multiply the first part, $\exp\{\beta_0+\beta_1X\}$ by 1, if you'd like. Of course, it won't change anything. So (w/ apologies), I still don't understand what you're getting at.
Mar 17, 2013 at 0:47 comment added dimitriy Please forgive me if I am being dense here. If I exponentiate your first equation, I get $Y=\exp \{\beta_0+\beta_1 X\}\cdot exp\{\varepsilon\}.$ Taking the expectation in the homoskedastic case, I get $E[Y \vert X]=\exp \{\beta_0+\beta_1 X\} \cdot E[exp\{\varepsilon\}].$ Doesn't the antilog of $\hat Y$ ignore the second term?
Mar 17, 2013 at 0:15 comment added gung - Reinstate Monica I still don't get the upshot here, @DimitriyV.Masterov. If the regression assumptions aren't met on the original $Y$ scale, we don't want $E[y_i|x_i]$, so it doesn't matter that $E[\ln(y_i)|x_i]\ne E[y_i|x_i]$. Just to double check, I just looked this up in Neter (1996), where it says, "If it is desired to express the estimated regression function in the original units of $Y$, we simply take the antilog of $\hat Y'$... " (p. 132).
Mar 16, 2013 at 23:41 comment added dimitriy I am worried that $\exp \{E[\ln y]\}\ne E[y].$ Under your normality assumptions, to get prediction on the un-logged scale you would need to multiply $\exp \{\ln(\hat y_i)\}$ by $E[\exp \{u_i\}] \approx \exp \{\frac{\hat \sigma^2}{2}\},$ where $\hat \sigma^2$ is the unbiased estimator of the log-linear regression model error.
Mar 16, 2013 at 20:18 comment added gung - Reinstate Monica I'm not sure what you're getting at, @DimitriyV.Masterov. If you are worried about whether your assumptions are met (eg, the variance scales w/ the mean &/or the residuals are skewed), & you transform $Y$ st, eg, $$\ln(Y)=\beta_0+\beta_1X+\varepsilon\\ \text{where }\varepsilon\sim\mathcal N(0,\sigma^2)$$, then you can get the predicted value at $x_i$ on the original $Y$ scale by $\exp(\widehat{\ln(y_i)})$, but you certainly wouldn't use $\exp(\beta_0)+\exp(\beta_1)x_i$.
Mar 16, 2013 at 17:53 comment added dimitriy Isn't the re-transformation problem more involved than simply back-transforming the prediction? For example, with the natural log transformation, $E[y_i \vert x_i]=\exp (x_i'\beta) \cdot E[\exp (u_i)]$?
Mar 16, 2013 at 4:44 history answered gung - Reinstate Monica CC BY-SA 3.0