eda_bipow | R Documentation |
Re-expresses a vector on the ladder of powers.
Requires eda_3pt()
function.
eda_bipow(dat, x, y, p = c(-1, 0, 0.5, 1, 2), tukey = TRUE, ...)
dat |
Data frame |
x |
Column name assigned the x axis |
y |
Column name assigned the y axis |
p |
Vector of powers |
tukey |
If set to TRUE, then adopt Tukey's power transformation. If FALSE, adopt Box-Cox transformation. |
... |
Other parameters passed to the graphics::plot function. |
Generates a matrix of scatter plots and boxplots of various re-expressions of both x and y values. The 3-point summary and associated half-slopes are also plotted (this function makes use of the eda_3pt function). The values are re-expressed using either the Tukey power transformation (default) or the Box-Cox transformation (see eda_re for more information on these transformation techniques). Axes labels are omitted to reduce plot clutter.
No return value
Tukey, John W. 1977. Exploratory Data Analysis. Addison-Wesley.
data(cars)
# Example 1
eda_bipow(dat = cars, x = speed, y = dist)
# Custom powers
eda_bipow(dat = cars, x = speed, y = dist, p = c(-1, -0.5, 0, 0.5, 1))
# Adopt box-cox transformation
eda_bipow(dat = cars, x = speed, y = dist, tukey = FALSE, p = c(-1, -0.5, 0, 0.5, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.