View source: R/cluster_functions.R
| add_spline_threshold | R Documentation |
Function takes a spline lookup table (or uses package default), and an object of class 'ObservedExpectedGrid' and identifies which rows in each potential centroid have observed over expected values that exceed a threshold for that observed value
add_spline_threshold(oe_grid, spline_lookup = NULL)
oe_grid |
An object of class 'ObservedExpectedGrid' generated by
|
spline_lookup |
default NULL; either a spline lookup table, which is a
data frame that has at least two columns: including "observed" and
"spl_thresh", OR a string indicating to use one of the built in lookup
tables: i.e. one of |
an object of class 'ClusterAlertTable' which is simply a data frame containing rows of the input 'oe_grid“ that represent the reduced set of candidate alert clusters
case_grid <- generate_case_grids(
example_count_data, example_count_data[, max(date)]
)
nci <- gen_nearby_case_info(
cg = case_grid,
distance_matrix = county_distance_matrix("OH")[["distance_matrix"]],
distance_limit = 25
)
obs_exp_grid <- generate_observed_expected(
nearby_counts = nci,
case_grid = case_grid
)
add_spline_threshold(oe_grid = obs_exp_grid)
add_spline_threshold(oe_grid = obs_exp_grid, spline_lookup = "01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.