Title: | A Non-Axis-Dominant Association Plotting Tool |
---|---|
Description: | A rotatogram is a method of displaying an association which is axis non-dominant. This is achieved in two ways: First, the method of estimating the slope and intercept uses the least-products method rather than more typical least squared error for the "dependent" variable. The least products method has no "dependent" variable and is scale independent. Second, the plot is rotated such that the resulting regression line is vertical, reducing the suggestion that the vertical axis is the dominant one. The slope can be read relative to either axis equally. |
Authors: | Noah Haber [aut, cre] |
Maintainer: | Noah Haber <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.1 |
Built: | 2024-11-08 03:26:27 UTC |
Source: | https://github.com/noahhaber/rotatogram |
A rotatogram is a method of displaying an association which is axis non-dominant. This is achieved in two ways: First, the method of estimating the slope and intercept uses the least-products method rather than more typical least squared error for the "dependent" variable. The least products method has no "dependent" variable and is scale independent. Second, the plot is rotated such that the resulting regression line is vertical, reducing the suggestion that the vertical axis is the dominant one. The slope can be read relative to either axis equally.
rotatogram( x1, x2, x1.label = "X1", x2.label = "X2", error.bootstrap = FALSE, error.bootstrap.iterations = 500, suppress.plot = FALSE, return.values = FALSE )
rotatogram( x1, x2, x1.label = "X1", x2.label = "X2", error.bootstrap = FALSE, error.bootstrap.iterations = 500, suppress.plot = FALSE, return.values = FALSE )
x1 |
(required) A vector containing the data for the x1 variable |
x2 |
(required) A vector containing the data for the x2 variable |
x1.label |
(optional) Changes the x1 axis label to the specified name |
x2.label |
(optional) Changes the x2 axis label to the specified name |
error.bootstrap |
(optional) Generates and displays bootstrapped errors to enable confidence bands, standard errors, and confidence intervals |
error.bootstrap.iterations |
(optional) Sets number of iterations for which to run bootstrap |
suppress.plot |
(optional) Suppresses the plot output |
return.values |
(optional) Exports the stored data for later access (e.g. slope and intercept calculated) |
description The resulting object contains the resulting intercept ($intercept), slope/beta ($beta), the slope in degrees ($slope.degrees)
# Output a rotatogram using the iris dataset rotatogram(iris$Sepal.Length,iris$Petal.Length,x1.label="Sepal length",x2.label="Petal length")
# Output a rotatogram using the iris dataset rotatogram(iris$Sepal.Length,iris$Petal.Length,x1.label="Sepal length",x2.label="Petal length")