Description Usage Arguments Value Figures Author(s) Examples
Plot the proportion of each predictor level having a specific outcome level and the 95% confidence interval of the proportion.
1 2 |
data |
The dataframe containing the predictor and outcome variables. |
predictor |
The predictor variable name. |
outcome |
The outcome variable name. |
ref_level |
A string providing the specific outcome level to show the proportions for. |
ref_value |
Defaults to 0.5. A numeric providing the proportion value of interest to compare to. |
add_n |
Defaults to TRUE. A logical indicating whether to add the total number of observations of each level to the plot. |
width |
Defaults to 0. A numeric providing the width of the error bars. |
Returns a ggplot object with the predictor levels on the x-axis and the proportion of values in the ref_level of the outcome on the y-axis.
Andrew Kostandy (andrew.kostandy@gmail.com)
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.