EST_ZINAR {ZINAR1}R Documentation

Parameter Estimation for ZINAR(1) Models

Description

This function uses the EM algorithm to find the maximum likelihood estimates of a ZINAR(1) model.

Usage

EST_ZINAR(y,init = NULL,tol = 1e-05,iter = 1000,model,innovation,desc = FALSE)

Arguments

y

A vector containing a discrete non-negative time series dataset.

init

A vector containing the initial parameters estimates to maximize the likelihood function. If not informed, uses Yule-Walker method to calculate.

tol

Tolerance for the convergence of the algorithm. Defaults to 1e-5.

iter

Maximum number of iterations of the algorithm. Defaults to 1000.

model

Must be "zinar", if the innovation have Zero-Inflated distribution, and "inar", otherwise.

innovation

Must be "Po" if Poisson, "NB" if Negative binomial or "GI" if Gaussian inverse.

desc

TRUE to plot the exploratory graphs. Defaults to FALSE.

Value

Returns a list containing the parameters estimates and the number of interactions.

References

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.

Examples


# Estimates the parameters of an INAR(1) and a ZINAR(1) models with Poisson innovations
# for the monthly number of drug offenses recorded from January 1990 to December 2001
# in Pittsburgh census tract 2206.

data(PghTracts)

y=ts(PghTracts$DRUGS,start=c(1990,1),end=c(2001,12),frequency=12)

Inar1 = EST_ZINAR(y, init = c(0.3,0.5,2), model = "inar", innovation = "Po",desc = TRUE)

ZIPInar1 = EST_ZINAR(y, init = c(0.3,0.5,2), model = "zinar", innovation = "Po",desc = TRUE)


[Package ZINAR1 version 0.1.0 Index]