cdplot | R Documentation |
Packed ggplot2
function to compare the empirical cumulative distribution functions (ECDF) between the treatment and control groups in an experiment or quasi-experiment.
data |
A data.frame including two columns, one recording the outcome and the other recording the assignment. The assignment column must be named as |
ks_test |
A logical option to indicate whether to show the Kolmogorov-Smirnov test result in the bottom-right corner. The default value is FALSE. |
point_size |
An integer to indicate the size of the points at the largest difference. The default value is 3. |
point_color |
An character or function to indicate the color of the points at the largest difference. The default value is |
link_color |
An character or function to indicate the color of the link at the largest difference. The default value is |
A list of ggplot2
objects comparing the ECDFs between the control and treatment groups and identifying at most three largest differences.
data("PlantGrowth")
plot_plant <- cdplot(PlantGrowth, ks_test = TRUE)
plot_plant
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.