1
$\begingroup$

I have been having trouble grasping the idea of back-transforming data in R. Lets assume that I would like to perform an ANOVA on transformed data. I transform the response variable and all the assumptions are met. I then run the ANOVA using the transformed data, and get my coefficients for my groups.

After this part is where I get confused about. How do I use the coefficients that I have obtained from running the ANOVA to back-transforme my data. I know that I am suppose to trace-back my steps from the transformation, but what exactly should I be tracing back?

$\endgroup$
0
$\begingroup$

That is actually not that complicated, but what has to be done depends on what the specific transforms are. By way of example, suppose that we do a log-log transform of the {$x,y$} data, and that the resulting model is linear. That means that in untransformed space, we have fit a power function to the data. If our model represents an improvement over plotting in the untransformed space, then our $R^2$-value has improved following transformation, and our residuals are then (likely) more homoscedastic. What of the other parameters? Let's take standard error (SE) of the $y$ estimate as an example. Since in the new space we now have better linearity, the SE becomes nonlinear in the original space. Ordinary SE of the estimate can be written as $$SE=SY \sqrt{1-r^2\frac{n-1}{n-2}}\;\;\;,$$ from Standard Error of Estimate. Now SE is a linear measure of error in estimating $y$, that is, it is a distance. So, for the mean value of $y$, i.e., $\bar{y}$, we would expect the standard error to bracket from $\bar{y}-SE$ to $\bar{y}+SE$, which means that in the original coordinate system the (now an asymmetric SE about $e^{\bar{y}}$) back-transformed SE goes from $$e^{\,\bar{y}-SE}\text{ to }e^{\,\bar{y}+SE}\;.$$ That is, $$SE_{\text{lower-orig.-cord.}}=e^{\,\bar{y}}-e^{\,\bar{y}-SE}<e^{\,\bar{y}+SE}-e^{\,\bar{y}}=SE_{\text{upper-orig.-cord.}}$$ Also, the introduced non-linearity for SE in the back-transformed coordinate system means that it is not uniform over its range. However, calculating it does provide some indication of what it means in the original, un-transformed data. So unlike for the answer given for a similar but less general question regarding the square root transform by @NickCox I would think it is worthwhile to do the calculations.

Unfortunately, one cannot list all of the possible back-transformation in one sitting, and, each back-transformed measure from each transformation has to be worked through. For example, regarding a log transform @Glen_b points out that the back-transformed mean of transformed data is not mean of the un-transformed data. However, the mean of the un-transformed data may be less useful than the mean (back-transformed or not) of the transformed data, it all depends on how these measurements are used, which necessitates interpreting them in the appropriate context.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.