Functions to calculate the analytical mean, variance and autocorrelation / partial autocorrelation / autocovariance function of an integer-valued generalised autoregressive conditional heteroscedasticity (INGARCH) process.
ingarch.mean(intercept, past_obs=NULL, past_mean=NULL)
ingarch.var(intercept, past_obs=NULL, past_mean=NULL)
ingarch.acf(intercept, past_obs=NULL, past_mean=NULL, lag.max=10,
type=c("acf", "pacf", "acvf"), plot=TRUE, ...)
numeric positive value for the intercept \(\beta_0\).
numeric non-negative vector containing the coefficients \(\beta_1,\ldots, \beta_p\) for regression on previous observations (see Details).
numeric non-negative vector containing the coefficients \(\alpha_1,\ldots, \alpha_q\) for regression on previous conditional means (see Details).
integer value indicating how many lags of the (partial) autocorrelation / autocovariance function should be calculated.
character. If type="acf"
(the default) the autocorrelation function is calculated, "pacf"
gives the partial autocorrelation function and "acvf"
the autocovariance function.
logical. If plot=TRUE
(the default) the values are plotted and returned invisible.
additional arguments to be passed to function plot
.
The INGARCH model of order \(p\) and \(q\) used here follows the definition
$$Z_{t}|{\cal{F}}_{t-1} \sim \mathrm{Poi}(\kappa_{t}),$$
where \({\cal{F}}_{t-1}\) is the history of the process up to time \(t-1\) and \(\mathrm{Poi}\) is the Poisson distribution parametrised by its mean (cf. Ferland et al., 2006).
The conditional mean \(\kappa_t\) is given by
$$\kappa_t = \beta_0 + \beta_1 Z_{t-1} + \ldots + \beta_p Z_{t-p}
+ \alpha_1 \kappa_{t-1} + \ldots + \alpha_q \kappa_{t-q}.$$
The function ingarch.acf
depends on the function tacvfARMA
from package ltsa
, which needs to be installed.
Ferland, R., Latour, A. and Oraichi, D. (2006) Integer-valued GARCH process. Journal of Time Series Analysis 27(6), 923--942, http://dx.doi.org/10.1111/j.1467-9892.2006.00496.x.
tsglm
for fitting a more genereal GLM for time series of counts of which this INGARCH model is a special case. tsglm.sim
for simulation from such a model.
# NOT RUN {
ingarch.mean(0.3, c(0.1,0.1), 0.1)
# }
# NOT RUN {
ingarch.var(0.3, c(0.1,0.1), 0.1)
ingarch.acf(0.3, c(0.1,0.1,0.1), 0.1, type="acf", lag.max=15)
# }
Run the code above in your browser using DataLab