simulation: Simulate From an INAR(p) Model

Description Usage Arguments Details Value References Examples

Description

Simulate from an INAR(p) model.

Usage

1
2
3
4
5
6
7
8
inar.sim(
  n,
  alpha,
  par,
  thinning = c("binomial", "nbinomial", "poisson"),
  innovation = "PO",
  n.start = NA
)

Arguments

n

A strictly positive integer given the length of the output series.

alpha

A vector of INAR coefficients.

par

A vector with the innovation process parameters.

thinning

Character; specification of the thinning operator. Currently, binomial ("binomial"), negative binomial ("nbinomial"), and Poisson ("poisson") thinning operators are available.

innovation

Character specification of the innovation process, see details.

n.start

The length of 'burn-in' period. If NA, the default, a reasonable value (500) is computed.

Details

There are some discrete distributions available for the innovation process specification. The following table display their names and their abbreviations to be passed to innovation().

Distribution Abbreviation Parameters
Bernoulli "BE" 0 < theta < 1
BerPoi "BP" theta > 0; 0 < phi < 1
BerG "BG" theta, phi > 0
Geometric "GE" theta > 0
Mean-Parameterized COM-Poisson "CP" theta, phi > 0
Negative Binomial "NB" theta, phi > 0
Poisson "PO" theta > 0

Value

A time-series object of class "ts".

References

Du, J.G. and Li,Y. (1991). The integer-valued autorregressive (INAR(p)) model. Journal of time series analysis. 12, 129–142.

Examples

1
2
3
4
5
6
7
# A Poisson INAR(3) simulation
y <- inar.sim(n = 1000, alpha = c(0.2, 0.3, 0.3), par = 5)
layout(matrix(c(1,2,1,2,1,3,1,3), ncol = 4))
plot(y)
acf(y, main = "")
pacf(y, main = "")
layout(1)

rdmatheus/tsinteger documentation built on March 24, 2021, 12:16 a.m.