spinar_est_param {spINAR}R Documentation

Parametric estimation of INAR models

Description

Parametric estimation of the autoregressive parameters and the innovation distribution of INAR(p) models, \code{p} \in \{1,2\}, with Poisson, geometrically or negative binomially distributed innovations. The estimation can either be moment- or maximum likelihood-based.

Usage

spinar_est_param(x, p, type, distr)

Arguments

x

[integer]
vector with integer observations.

p

[integer(1)]
order of the INAR model, where \code{p} \in \{1,2\}.

type

[string(1)]
type of estimation \in \code{\{"mom", "ml"\}}, where "mom" performs moment-based estimation and "ml" maximum likelihood-based estimation.

distr

[string(1)]
parametric family of innovation distribution \in \code{\{'poi', 'geo', 'nb'\}}, where "poi" denotes Poi(lambda), "geo" Geo(prob) and "nb" NB(r, prob) distributions.

Value

Named vector containing the estimated coefficients \code{alpha}_1,...,\code{alpha}_p and the estimated parameter(s) of the innovation distribution.

Examples

# generate data
# Poi-INAR(1) data
dat1 <- spinar_sim(n = 200, p = 1, alpha = 0.5, pmf = dpois(0:20, 1))
# Geo-INAR(2) data
dat2 <- spinar_sim(n = 200, p = 2, alpha = c(0.2, 0.3),
                   pmf = dgeom(0:60, 0.5))
# NB-INAR(1) data
dat3 <- spinar_sim(n = 200, p = 1, alpha = 0.5, pmf = dnbinom(0:40, 2, 2/3))

# moment-based parametric estimation of Poi-INAR(1) model
spinar_est_param(x = dat1, p = 1, type = "mom", distr = "poi")
# moment-based parametric estimation of Geo-INAR(2) model
spinar_est_param(x = dat2, p = 2, type = "mom", distr = "geo")
# maximum likelihood-based parametric estimation of NB-INAR(1) model
spinar_est_param(x = dat3, p = 1, type = "ml", distr = "nb")


[Package spINAR version 0.2.0 Index]