rotatogram {rotatogram}R Documentation

Rotatogram

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.

Usage

rotatogram(
  x1,
  x2,
  x1.label = "X1",
  x2.label = "X2",
  suppress.plot = FALSE,
  return.values = FALSE
)

Arguments

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

suppress.plot

(optional) Suppresses the plot output

return.values

(optional) Exports the stored data for later access (e.g. slope and intercept calculated)

Value

description The resulting object contains the resulting intercept ($intercept), slope/beta ($beta), the slope in degrees ($slope.degrees)

Examples

# Output a rotatogram using the iris dataset
rotatogram(iris$Sepal.Length,iris$Petal.Length,x1.label="Sepal length",x2.label="Petal length")


[Package rotatogram version 0.1.3 Index]