View source: R/gen_densities.R
gen_densities | R Documentation |
quantileplot
Estimate the conditional density of the outcome at at particular values of the predictor. These conditional densities appear as vertical slices in the output of quantileplot
. This function is typically called indirectly via a user call to quantileplot
.
gen_densities( data, slice_n = 7, x_data_range = NULL, y_data_range = NULL, x_bw = NULL, y_bw = NULL, granularity = 512 )
data |
Data frame containing columns |
slice_n |
Integer number of vertical slices (conditional densities of y given x) to be plotted. Default is 5. |
x_data_range |
Numeric vector of length 2 containing the range of horizontal values to be plotted. Defaults to the range of the predictor variable in |
y_data_range |
Numeric vector of length 2 containing the range of vertical values to be plotted. Defaults to the range of the outcome variable in |
x_bw |
Numeric bandwidth for density estimation in the |
y_bw |
Numeric bandwidth for density estimation in the |
granularity |
Integer number of points at which to evaluate each density. Defaults to 512, as in |
List containing marginal
and conditional
, each of which is a data frame with density estimates.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.