generate.mar | R Documentation |
This function simulates multiple random sample paths from a mixture of k Gaussian AR(p) processes. The model is of the form
y_t = φ_{0,i} + φ_{1,i}y_{t-1} + … + φ_{p,i}y_{t-p} + σ_{i,t}ε_t
with probability α_i, where ε_t is a N(0,1) variate. The index of the tsibble is guessed from the MAR model seasonal periods.
## S3 method for class 'mar' generate(x, length = 100, nseries = 10, ...) ## S3 method for class 'ets' generate(x, length = 100, nseries = 10, ...) ## S3 method for class 'Arima' generate(x, length = 100, nseries = 10, ...)
x |
A 'mar' object, usually the output of |
length |
length of series to generate |
nseries |
number of series to generate |
... |
Other arguments, passed to |
'tsibble' object with 'length' rows and 3 columns.
Rob J Hyndman
Feng Li, Mattias Villani, and Robert Kohn. (2010). Flexible Modeling of Conditional Distributions using Smooth Mixtures of Asymmetric Student T Densities, Journal of Statistical Planning and Inference, 140(12), pp. 3638-3654.
mar_model
, simulate.mar
# MAR model with constant variances phi <- cbind(c(0, 0.8, 0), c(0, 0.6, 0.3)) weights <- c(0.8, 0.2) model1 <- mar_model(phi = phi, sigmas = c(1, 2), weights = weights) generate(model1, nseries = 5) # MAR model for hourly data with daily and weekly periods hourly_model <- mar_model(seasonal_periods = c(24, 24*7)) generate(hourly_model)