View source: R/threshold_small_multiple.R

thresh_sm | R Documentation |

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.

```
thresh_sm(
formula,
data,
ID = ID,
weights = weights,
small_mult = 6,
lower_percentile = 0.05,
upper_percentile = 0.95
)
```

`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. |

`small_mult` |
How many 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)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.