create_fn_data.Rd
This function generates seasonal group data required for fitting a Farrington-like Generalized Linear Model (GLM). The function leverages the `surveillance` package to create a dataset that includes seasonal groupings based on historical data, which is particularly useful for modeling seasonality in time series data.
create_fn_data(ts_length, freq = 52)
integer, specifying the length of the time series for which the seasonal group data is to be generated.
integer, default 52, specifying the frequency of the time series (e.g., 52 for weekly data).
A data frame containing the seasonal groupings (`seasgroups`) for the specified time series length. These seasonal groupings are used as covariates in the Farrington GLM model to account for seasonality.
if (FALSE) {
# Generate seasonal group data for a time series of length 100 with weekly frequency
create_fn_data(100)
}