| data_simu | R Documentation |
This function simulates time series data for Zero-Inflated INAR(1) (ZI-INAR(1)) or Hurdle INAR(1) (H-INAR(1)) models, using Poisson, Negative Binomial, Generalized Poisson, or Conway-Maxwell-Poisson (CMP) innovations.
data_simu(n, alpha, rho, lambda, disp = NULL, mod_type, distri)
n |
Integer specifying the number of observations to simulate. |
alpha |
Numeric value between 0 and 1 representing the autoregressive parameter (strictly between 0 and 1). |
rho |
Numeric value between 0 and 1 representing the zero-inflation or hurdle parameter. |
lambda |
Numeric value (> 0) representing the location parameter (mean) for Poisson, or the location parameter for NB, GP, and CMP distributions. For CMP this is the rate parameter, not generally the mean. |
disp |
Numeric value representing the dispersion parameter.
|
mod_type |
Character string indicating the model type ("zi" or "h"). |
distri |
Character string specifying the distribution. Options are:
|
The first 100 observations are discarded as burn-in.
Zero inflation applies to the innovations, not directly to the series.
For an ordinary CMP-INAR(1) process use rho = 0.
This simulates CMP innovations, not a CMP stationary marginal distribution.
A numeric vector containing the simulated time series data.
Part of the implementation of this function was adapted from the ZINAR1 package. The ZINAR1 package simulates first-order integer-valued autoregressive processes with zero-inflated innovations (ZINAR(1)) and estimates its parameters under a frequentist approach.
For more information about the ZINAR1 package, please refer to:
Aldo M. Garay, João Vitor Ribeiro (2022). ZINAR1: Simulates ZINAR(1) Model and Estimates Its Parameters Under Frequentist Approach. R package version 0.1.0. Available at: https://CRAN.R-project.org/package=ZINAR1.
Garay, A. M., Ribeiro, J. V. (2021). First-Order Integer Valued AR Processes with Zero-Inflated Innovations. In: Nonstationary Systems: Theory and Applications, Springer. DOI: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-3-030-82110-4_2")}.
We acknowledge the original authors, Aldo M. Garay and João Vitor Ribeiro, for their contributions.
# Simulate 50 observations from a Zero-Inflated Poisson INAR(1) model
y_data <- data_simu(n = 50, alpha = 0.5, rho = 0.3, lambda = 5,
mod_type = "zi", distri = "poi")
head(y_data)
# Simulate a zero-inflated CMP-INAR(1) series (disp is nu)
y_cmp <- data_simu(n = 50, alpha = 0.5, rho = 0.3, lambda = 2.5,
disp = 1.2, mod_type = "zi", distri = "cmp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.