Title: | Simulate INAR/ZINAR(p) Models and Estimate Its Parameters |
---|---|
Description: | Simulation, exploratory data analysis and Bayesian analysis of the p-order Integer-valued Autoregressive (INAR(p)) and Zero-inflated p-order Integer-valued Autoregressive (ZINAR(p)) processes, as described in Garay et al. (2020) <doi:10.1080/00949655.2020.1754819>. |
Authors: | Aldo William Medina Garay [aut], Francyelle de Lima Medina [aut], Tharso Augustus Rossiter Araújo Monteiro [aut, cre] |
Maintainer: | Tharso Augustus Rossiter Araújo Monteiro <[email protected]> |
License: | GPL (>= 3.0) |
Version: | 0.1.0 |
Built: | 2024-11-21 06:22:55 UTC |
Source: | CRAN |
This function uses MCMC algorithms (Metropolis-Hastings and Gibbs Sampler) to generate a chain of INAR/ZINAR(p) parameter estimators.
estimate_zinarp( x, p, iter = 5000, thin = 2, burn = 0.1, innovation = "Poisson" )
estimate_zinarp( x, p, iter = 5000, thin = 2, burn = 0.1, innovation = "Poisson" )
x |
A vector containing a discrete non-negative time series dataset. |
p |
The order of the INAR/ZINAR process. |
iter |
The number of iterations to be considered. Defaults to 5000. |
thin |
Lag for posterior sample. Defaults to 2. |
burn |
Burn-in for posterior sample. Defaults to 0.1. Must be in (0,1). |
innovation |
Distribution to be used for the innovation : "Poisson" or "ZIP". Defaults to Poisson. |
Returns a list containing a posteriori samples for the specified model parameters.
Garay, Aldo M., Francyelle L. Medina, Celso RB Cabral, and Tsung-I. Lin. "Bayesian analysis of the p-order integer-valued AR process with zero-inflated Poisson innovations." Journal of Statistical Computation and Simulation 90, no. 11 (2020): 1943-1964.
Garay, Aldo M., Francyelle L. Medina, Isaac Jales CS, and Patrice Bertail. "First-Order Integer Valued AR Processes with Zero-Inflated Innovations." In Workshop on Nonstationary Systems and Their Applications, pp. 19-40. Springer, Cham, 2021.
test <- simul_zinarp(alpha = 0.1, lambda = 1, n = 100) e.test <- estimate_zinarp(x = test, p = 1, iter = 800, innovation= "Poisson") alpha_hat <- mean(e.test$alpha) lambda_hat <- mean(e.test$lambda) data(slesions) e.slesions <- estimate_zinarp(slesions$y, p = 1, iter = 800, innovation = 'ZIP') alpha_hat_slesions <- mean(e.slesions$alpha) lambda_hat_slesions <- mean(e.slesions$lambda) rho_hat_slesions <- mean(e.slesions$rho)
test <- simul_zinarp(alpha = 0.1, lambda = 1, n = 100) e.test <- estimate_zinarp(x = test, p = 1, iter = 800, innovation= "Poisson") alpha_hat <- mean(e.test$alpha) lambda_hat <- mean(e.test$lambda) data(slesions) e.slesions <- estimate_zinarp(slesions$y, p = 1, iter = 800, innovation = 'ZIP') alpha_hat_slesions <- mean(e.slesions$alpha) lambda_hat_slesions <- mean(e.slesions$lambda) rho_hat_slesions <- mean(e.slesions$rho)
This function generates a graph for exploring ZINAR(p) processes.
explore_zinarp(x)
explore_zinarp(x)
x |
A vector containing a discrete non-negative time series data set. |
Plot time series graph, relative frequency bar plot, autocorrelation function graph and partial autocorrelation function graph on a common plot.
This function generates a realization of a ZINAR(p) process.
simul_zinarp(n, alpha, lambda, pii = 0)
simul_zinarp(n, alpha, lambda, pii = 0)
n |
The length of the simulated chain. |
alpha |
The p-dimensional vector (in which p is the process order) of alpha values, the probabilities of an element remaining in the process.All alpha elements must be in [0,1] and their sum must be smaller than 1. |
lambda |
The Poisson rate parameter. Must be greater than zero. |
pii |
The probability of a structural zero (i.e., ignoring the Poisson distribution) under ZIP innovation sequences. Defaults to 0, following a standard Poisson. |
Returns a numeric vector representing a realization of an INAR/ZINAR(p) process.
Garay, Aldo M., Francyelle L. Medina, Celso RB Cabral, and Tsung-I. Lin. "Bayesian analysis of the p-order integer-valued AR process with zero-inflated Poisson innovations." Journal of Statistical Computation and Simulation 90, no. 11 (2020): 1943-1964.
Garay, Aldo M. ; Medina, Francyelle L. ; Jales, Isaac C. ; Bertail, Patrice. First-order integer valued AR processes with zero-inflated innovations. Cyclostationarity: Theory and Methods, Springer Verlag - 2021, v. 1, p. 19-40.
Monthly number of skin lesions-related submissions to animal health laboratories from a region in New Zealand, obtained from 2003 to 2009.
slesions
slesions
An object of class data.frame
with 84 rows and 1 columns.
Jazi, Mansour Aghababaei, Geoff Jones, and Chin‐Diew Lai. "First‐order integer valued AR processes with zero inflated Poisson innovations." Journal of Time Series Analysis 33.6 (2012): 954-963.