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 |
[ |
p |
[ |
type |
[ |
distr |
[ |
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")