thresh_sm: A plot that summarised the relationship between a variable...

Description Usage Arguments

View source: R/threshold_small_multiple.R

Description

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.

Usage

1
2
3
4
5
6
7
8
9
thresh_sm(
  formula,
  data,
  ID = ID,
  weights = weights,
  small_mult = 25,
  lower_percentile = 0.05,
  upper_percentile = 0.95
)

Arguments

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)


timcdlucas/agouti documentation built on Jan. 14, 2022, 7:33 p.m.