Type: | Package |
Title: | Simulate INAR/ZINAR(p) Models and Estimate Its Parameters |
Version: | 0.1.0 |
Maintainer: | Tharso Augustus Rossiter Araújo Monteiro <tharso.augustus@ufpe.br> |
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>. |
License: | GPL (≥ 3.0) |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | progress, stats, utils, graphics |
RoxygenNote: | 7.1.1 |
Depends: | R (≥ 2.10) |
NeedsCompilation: | no |
Packaged: | 2022-05-06 14:57:02 UTC; tharso |
Author: | Aldo William Medina Garay [aut], Francyelle de Lima Medina [aut], Tharso Augustus Rossiter Araújo Monteiro [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2022-05-09 11:30:02 UTC |
Parameter estimation for ZINARp models
Description
This function uses MCMC algorithms (Metropolis-Hastings and Gibbs Sampler) to generate a chain of INAR/ZINAR(p) parameter estimators.
Usage
estimate_zinarp(
x,
p,
iter = 5000,
thin = 2,
burn = 0.1,
innovation = "Poisson"
)
Arguments
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. |
Value
Returns a list containing a posteriori samples for the specified model parameters.
References
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.
Examples
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)
EXPLORATORY DATA ANALYSIS FOR ZINAR(p) PROCESSES
Description
This function generates a graph for exploring ZINAR(p) processes.
Usage
explore_zinarp(x)
Arguments
x |
A vector containing a discrete non-negative time series data set. |
Value
Plot time series graph, relative frequency bar plot, autocorrelation function graph and partial autocorrelation function graph on a common plot.
Sample Generator for ZINAR(p)
Description
This function generates a realization of a ZINAR(p) process.
Usage
simul_zinarp(n, alpha, lambda, pii = 0)
Arguments
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. |
Value
Returns a numeric vector representing a realization of an INAR/ZINAR(p) process.
References
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.
Skin lesions dataset
Description
Monthly number of skin lesions-related submissions to animal health laboratories from a region in New Zealand, obtained from 2003 to 2009.
Usage
slesions
Format
An object of class data.frame
with 84 rows and 1 columns.
References
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.