Simulate baseline data ---- Simulation of baseline data.
Source:R/simulation_data_baseline.R
simulate_baseline_data.Rd
This function simulates a time series of daily counts in the absence of outbreaks. Data is simulated using a poisson/negative binomial model as described in Noufaily et al. (2019). Properties of time series such as frequency of baseline observations, trend, seasonal and weekly pattern can be specified in the simulation.
Usage
simulate_baseline_data(
start_date,
end_date,
seasonal_pattern_n,
weekly_pattern_n,
alpha,
beta,
gamma_1,
gamma_2,
gamma_3,
gamma_4,
phi,
shift_1
)
Arguments
- start_date
Starting date of the simulation period. Date is in the format of 'yyyy-mm-dd'.
- end_date
Ending date of the simulation period. Date is in the format of 'yyyy-mm-dd'.
- seasonal_pattern_n
Number of seasonal patterns. For no seasonal pattern seasonal_pattern_n = 0. Seasonal_pattern_n = 1 represents annual pattern. Seasonal_pattern_n = 2 indicates biannual pattern.
- weekly_pattern_n
Number of weekly patterns. For no specific weekly pattern, weekly_pattern_n = 0. Weekly_pattern_n = 1 represents one weekly peak.
- alpha
The parameter is used to specify the baseline frequencies of reports
- beta
The parameter is used to specify to specify linear trend
- gamma_1
The parameter is used to specify the seasonal pattern
- gamma_2
The parameter is used to specify the seasonal pattern
- gamma_3
The parameter is used to specify day-of-the week pattern
- gamma_4
The parameter is used to specify day-of-the week pattern
- phi
Dispersion parameter. If phi =0, a Poisson model is used to simulate baseline data.
- shift_1
Horizontal shift parameter to help control over week/month peaks.