R: Creating a Seasonal ARIMA Time Series Model Using Existing Data Parameters

I have time series data that I can use to determine the parameters of the basic stochastic process. For example, I have a seasonal model ARIMA SARIMA (p, d, q) (P, D, Q) [S].

How to use this to generate a new dataset of time series data?

To be more specific: SARIMA (1,0,1) (1,0,0) [12] - how can I generate a time series for a 10-year period for each month? (ie 120 points to estimate the number of โ€œcountersโ€.)

+4
source share
2 answers

Use simulate.Arima() from the forecast package. It handles seasonal ARIMA models, while arima.sim() does not.

However, ARIMA models are not suitable for time series counters, since they assume that the process is defined on the entire real line.

+9
source

Late departure to the party, but certainly the ideal solution for creating SARIMA (p,d,q)(P,D,Q)[S] models without data preparation, since it significantly reduces the threshold. Recently, a SARIMA object SARIMA been added to the gmwm package ( disclaimer: author).

This function is currently located on GitHub , and therefore the syntax may change.

Generation Code Example

 # install.packages("devtools") devtools::install_github("smac-group/gmwm") # Set seed for reproducibility set.seed(5532) # Generate a SARIMA(1,0,1)(1,0,0)[12] mod = SARIMA(ar=.6, i = 0, ma=.3, sar = .5, si = 0, sma = 0, s = 12, sigma2 = 1) # Generate the data xt = gen_gts(1e3, mod) # Try to recover parameters arima(xt, order = c(1,0,1), seasonal = list(order = c(1,0,0), period = 12), include.mean = FALSE) 

Output:

 Call: arima(x = xt, order = c(1, 0, 1), seasonal = list(order = c(1, 0, 0), period = 12), include.mean = F) Coefficients: ar1 ma1 sar1 0.5728 0.3117 0.5035 se 0.0335 0.0371 0.0274 sigma^2 estimated as 1.008: log likelihood = -1424.89, aic = 2857.78 

Miscellaneous: Update this post in gmwm v3.0.0 release.

0
source

All Articles