0
$\begingroup$

I was going through the book "ggplot2" and i got stuck at point where in chapter 3 where writer talks about two different kinds of transformations(scale and statistical), although i understood the context but i am still not very confident about the difference between scale transformation and statistical transformation?

Can someone help me ?

Many thanks

$\endgroup$

1 Answer 1

1
$\begingroup$

Have a look at page 33 (I am looking at the 2009 version, section 3.5). It is stated that:

Scale transformation occurs before statistical transformation so that statistics are computed on the scale-transformed data. This ensures that a plot of log(x) vs log(y) on linear scales looks the same as x vs y on log scales. There are many di erent transformations that can be used, including taking square roots, logarithms and reciprocals. See Section 6.4.2 for more details.

This is quite illuminating but if you also go through the first chapters of the book you will see that "statistical" transformations are mentioned a lot. To make the long story short, from the above (and other examples):

  • Scale transformations refer to transformations made directly on the numerical data of your dataset, for example conversions from the natural scale to a logarithmic scale, or a radial co-ordinate system. These should take place before statistical transformations.
  • Statistical transformations refer to transformations made by ggplot2 (or specified by the users through a formula where this is possible) to render the requested plot. For example, like the hist R function, histogram bins are created internally and you do not have to create them by yourself. You simply supply a numeric vector to hist and it takes care of the rest. The same applies to ggplot2 and these are the statistical transformation (in the histogram case, the statistical transformation is the variable binning). Other statistical transformations would for example include the calculations made on the data to draw a boxplot.

Hope this answers at least partly your question.

$\endgroup$
0

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.