scatter.quantileplot: Create a Scatter for a Quantile Plot

View source: R/scatter.quantileplot.R

scatter.quantileplotR Documentation

Create a Scatter for a Quantile Plot

Description

Converts a quantile plot into an analogous scatter plot.

Usage

scatter.quantileplot(object, fraction = 1, ...)

Arguments

object

An object of class quantileplot, created by a call to quantileplot().

fraction

Numeric scalar in (0,1]. Fraction of points to be randomly sampled for inclusion in the scatter plot. Useful in very large data sets.

...

Other arguments

Value

A ggplot2 object containing a scatter plot.

References

Lundberg, Ian, Robin C. Lee, and Brandon M. Stewart. 2021. "The quantile plot: A visualization for bivariate population relationships." Working paper.

Lundberg, Ian, and Brandon M. Stewart. 2020. "Comment: Summarizing income mobility with multiple smooth quantiles instead of parameterized means." Sociological Methodology 50(1):96-111.

Fasiolo, Matteo, Simon N. Wood, Margaux Zaffran, Raphaƫl Nedellec, and Yannig Goude. 2020. "Fast calibrated additive quantile regression." Journal of the American Statistical Association.

Examples

x <- rbeta(1000,1,2)
y <- log(1 + 9 * x) * rbeta(1000, 1, 2)
data <- data.frame(x = x, y = y)
qp <- quantileplot(y ~ s(x), data)
scatter.quantileplot(qp)

ilundberg/quantileplot documentation built on May 23, 2022, 3:12 a.m.