get_signals_stratified.Rd
This function stratifies and aggregates surveillance data by specified columns and analyzes each stratum separately using the specified method.
get_signals_stratified(
data,
fun,
model = "",
intervention_date = NULL,
time_trend = FALSE,
stratification_columns,
date_start = NULL,
date_end = NULL,
date_var = "date_report",
number_of_weeks = 6
)
A data frame containing the surveillance data.
The signal detection function to apply to each stratum.
character, default empty string which is the choice if farrington, ears or cusum are used and if a glm method was chosen as outbreak detection method then one of c("mean","sincos", "FN")
A date object or character of format yyyy-mm-dd specifying the date for the intervention in the pandemic correction models. After this date a new intercept and possibly time_trend is fitted.
boolean default TRUE setting time_trend in the get_signals_glm(). This parameter is only used when an the glm based outbreak detection models are used, i.e. for the models c("mean","sincos", "FN")
A character vector specifying the columns to stratify the data by.
A date object or character of format yyyy-mm-dd specifying the start date to filter the data by. Default is NULL.
A date object or character of format yyyy-mm-dd specifying the end date to filter the data by. Default is NULL.
a character specifying the date variable name used for the aggregation. Default is "date_report".
integer, specifying number of weeks to generate signals for.
A tibble containing the results of the signal detection analysis stratified by the specified columns.