arma_sim: Simulate ARMA-Process

Description Usage Arguments Details Value Examples

View source: R/arma_sim.R

Description

Simulate from an ARMA model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
arma_sim(
  phi = NULL,
  theta = NULL,
  mu = 0,
  n,
  innov.gen = stats::rnorm,
  innov = NULL,
  burnin = NULL,
  ...
)

Arguments

phi, theta

a numeric vector specifying the AR(MA)-Coefficients of an ARMA(p,q) model

mu

a numeric vector specifying the mean of the ARMA(p,q)-Series. Default is zero mean

n

an integer specifying the length of the resulting time series.

innov.gen

a distribution, from which the random innovations are drawn.

innov

an optional time series of innovations. If not provided, rand.gen is used

burnin

an integer specifying the number of datapoints that are going to be discarded, so that the characteristics of final series do not depend on the initial values

...

additional arguments for rand.gen, like mean or standard deviation

Details

The ARMA model is the description of a stochastic process in terms of two plynomials, one for the autoregression (AR) and the second for the moving average (MA). These polynomials can be parametrized in this function, which gives than a simulated time series with the specified characteristics. For more details see the long documentation in the vignette "Dokumentation".

Value

object of class "arma" containing the simulated arma series, the innovation series and the specified parameters

Examples

1
arma_sim(phi = c(0.5,-0.1), theta = c(0.1,0.2,-0.3), n=100)

adrian1econ/TimeSeries documentation built on Aug. 25, 2020, 5:18 p.m.