Description Usage Arguments Value
This function does a few things worth noting. It subsets data to the analysis time. It pulls in an appropriate SARIMA fit, either a leave-one-season-out fit if the analysis time is before the first test season or a fit based on all of the training data if the analysis time is in or after the first test season. It linearly interpolates missing values. It handles log transformations and possible seasonal differencing that may be done outside of functionality in the forecast package.
1 2 | sample_predictive_trajectories_arima_wrapper(n_sims, max_prediction_horizon,
data, region, analysis_time_season, analysis_time_season_week, params)
|
n_sims |
number of trajectories to simulate |
max_prediction_horizon |
how many steps ahead to simulate |
data |
data set |
region |
region |
analysis_time_season |
season in which we're predicting |
analysis_time_season_week |
week of the season in which we're making our predictions, using all data up to the analysis time to make predictions for later time points |
params |
other parameters. A list with the following entries: * fits_filepath = path to a directory where SARIMA model fits are located * prediction_target_var = string naming variable in data we are predicting * seasonal_difference = logical specifying whether a seasonal difference should be computed manually before passing to auto.arima * transformation = string, either "log", "box-cox", or "none", indicating type of transformation to do * first_test_season = string, in format of "2011/2012", specifying first test season. |
an n_sims by h matrix with simulated values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.