View source: R/threshold_small_multiple.R
The plot is created by calculating, within each group, the proportion of observations that are above a threshold. A scatter plot with a linear model is plotted of the relationship between this proportion and the aggregated output. The threshold is varied and small multiples of the different values are plotted.
1 2 3 4 5 6 7 8 9 |
formula |
A formula for the y and x variables. |
data |
A data frame suitable for aggregate outputs models. |
ID |
The column to use as the group ID column. Unquoted value. |
weights |
Which column to use as within group weights such as population or time. data(madagascar_malaria) group_summary_plot(case_rate ~ LSTmean, data = madagascar_malaria, ID = ID, weights = pop) |
small_mult |
How much small multiples to make. |
lower_percentile |
Lowest percentile to use |
upper_percentile |
Highest percentile to use data(madagascar_malaria) thresh_sm(case_rate ~ LSTmean, data = madagascar_malaria, ID = ID, weights = pop) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.