Selects data for report.
select_for_report(
d,
unit_df = NULL,
unit_group_name = NULL,
min_y_new = 0,
min_diff = 0
)
Data frame as returned from countcheck()
Data frame with columns unit, unit_group_name, unit_name, and unit_url (ignored if NA). Must contain exactly one record for each unit in d. (default: NULL)
Name of unit group for which data should be returned. Can be part of name (substring). (default: NULL)
Minimum value for y_new (default: 0)
Minimum difference between y_new and ucl_partpool (default: 0)
Data frame to be passed in countcheck_list to html_report()
Selected columns:
unit: ID for unit
y_new: new count values of interest
ucl_partpool: UCL based on n_new and partial-pooling estimate of theta
fe_partpool: factor f, with observed y_new exceeding partial-pooling UCL by f * sd(y_new), given n_new and partial-pooling estimate of theta
Condition that always applies: y_new must exceed ucl_partpool.
Additional optional conditions:
y_new exceeds min_y_new (default: 0)
difference between y_new and ucl_partpool exceeds min_diff (default: 0)
unit_group_name (if present) matches part of group name in unit_df (if present) for units in d
Returned data is sorted by fe_partpool in descending order. Therefore, items towards the top are less likely to be the result of random fluctuations.