% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.ARCHmXAdditive.R
\name{sim.ARCHmXAdditive}
\alias{sim.ARCHmXAdditive}
\title{Simulate data from an ARCHmXAdditive model}
\usage{
sim.ARCHmXAdditive(n, 
  alpha, 
  m, 
  X, 
  delta = 2, 
  valinit = 200, 
  shock.distr = "Normal"
)
}
\arguments{
\item{n}{Desired length of simulated time series data.}
\item{alpha}{Set of parameters which determines the model's \eqn{p}-step time dependence.}
\item{m}{List of length \code{ncol(X)} containing univariate functions \eqn{m_1,\ldots,m_d}. Each \code{m[[ell]]} must accept a single numeric input and return a single finite nonnegative numeric value. The additive term is \eqn{\sum_{\ell=1}^d m_\ell(X_{t-1,\ell})}.}
\item{X}{Matrix with exogenous covariates where each row is an observation. Must be compatible with \code{m}.}
\item{delta}{Value of the power of the main time series for a POWER-GARCH, default is 2.}
\item{valinit}{Integer burn-in length used to stabilize the recursion before returning the simulated sample. Default is 200.}
\item{shock.distr}{Innovation (shock) distribution for \eqn{z_t}. One of \code{"Normal"}, \code{"t5"}, \code{"t7"}, or \code{"Laplace"}.}
}
\value{
A vector of simulated \eqn{\epsilon}s corresponding to each observation (row) in \eqn{X}.
}
\description{
Returns a sample Additive ARCH-m(X) time series given \eqn{\alpha}s, data \eqn{X}, and list of functions \code{m} provided by the user. A vector of simulated \eqn{\epsilon}s will be returned for every row in \eqn{X}.
}
\examples{
set.seed(1)
n <- 2000
alpha <- c(0.2, 0.1)
valinit <- 200
X <- matrix(rnorm((n+valinit) * 3), ncol = 3)

m <- list(
  function(x) 4 * abs(sin(x)),
  function(x) 2 * x^2,
  function(x) 1.5
)

data <- sim.ARCHmXAdditive(n = n, alpha = alpha, X = X, m = m)
summary(data$eps)
plot(data$eps, type = "l", main = "Simulated additive ARCH-m(X) series")
}
