Description Usage Arguments Details Value Author(s) References See Also Examples
Function generates data using ETS with Single Source of Error as a data generating process for the demand occurrence. As the main output it produces probabilities of occurrence.
1 2 3 4 5 6 7  sim.oes(model = "MNN", obs = 10, nsim = 1, frequency = 1,
occurrence = c("oddsratio", "inverseoddsratio", "direct", "general"),
bounds = c("usual", "admissible", "restricted"), randomizer = c("rlnorm",
"rinvgauss", "rgamma", "rnorm"), persistence = NULL, phi = 1,
initial = NULL, initialSeason = NULL, modelB = model,
persistenceB = persistence, phiB = phi, initialB = initial,
initialSeasonB = initialSeason, ...)

model 
Type of ETS model according to [Hyndman et. al., 2008]
taxonomy. Can consist of 3 or 4 chars: 
obs 
Number of observations in each generated time series. 
nsim 
Number of series to generate (number of simulations to do). 
frequency 
Frequency of generated data. In cases of seasonal models must be greater than 1. 
occurrence 
Type of occurrence model. See 
bounds 
Type of bounds to use for persistence vector if values are
generated. 
randomizer 
Type of random number generator function used for error
term. It is advised to use 
persistence 
Persistence vector, which includes all the smoothing
parameters. Must correspond to the chosen model. The maximum length is 3:
level, trend and seasonal smoothing parameters. If 
phi 
Value of damping parameter. If trend is not chosen in the model, the parameter is ignored. 
initial 
Vector of initial states of level and trend. The maximum
length is 2. If 
initialSeason 
Vector of initial states for seasonal coefficients.
Should have length equal to 
modelB 
Type of model B. This is used in 
persistenceB 
The persistence vector for the model B. 
phiB 
Value of damping parameter for the model B. 
initialB 
Vector of initial states of level and trend for the model B. 
initialSeasonB 
Vector of initial states for seasonal coefficients for the model B. 
... 
Additional parameters passed to the chosen randomizer. All the parameters should be passed in the order they are used in chosen randomizer. Both model A and model B share the same parameters for the randomizer. 
For the information about the function, see the vignette:
vignette("simulate","smooth")
List of the following values is returned:
model
 Name of ETS model.
modelA
 Model A, generated using sim.es()
function;
modelB
 Model B, generated using sim.es()
function;
probability
 The value of probability generated by the model;
occurrence
 Type of occurrence used in the model;
logLik
 Loglikelihood of the constructed model.
Ivan Svetunkov, ivan@svetunkov.ru
Snyder, R. D., 1985. Recursive Estimation of Dynamic Linear Models. Journal of the Royal Statistical Society, Series B (Methodological) 47 (2), 272276.
Hyndman, R.J., Koehler, A.B., Ord, J.K., and Snyder, R.D. (2008) Forecasting with exponential smoothing: the state space approach, SpringerVerlag. doi: 10.1007/9783540719182.
1 2 3 4 5 6 7  # This example uses rinvgauss function from statmod package.
oETSMNNIG < sim.oes(model="MNN",frequency=12,obs=60,
randomizer="rinvgauss",mean=1,dispersion=0.5)
# A simpler example with log normal distribution
oETSMNNlogN < sim.oes(model="MNN",frequency=12,obs=60,initial=1,
randomizer="rlnorm",meanlog=0,sdlog=0.1)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.