ACMx: Estimation of Autoregressive Conditional Mean Models

ACMxR Documentation

Estimation of Autoregressive Conditional Mean Models

Description

Estimation of autoregressive conditional mean models with exogenous variables.

Usage

ACMx(y, order = c(1, 1), X = NULL, cond.dist = "po", ini = NULL)

Arguments

y

time series of counts.

order

the order of ACM model.

X

matrix of exogenous variables.

cond.dist

conditional distributions. "po" for Poisson, "nb" for negative binomial, "dp" for double Poisson.

ini

initial parameter estimates designed for use in "nb" and "dp".

Value

ACMx returns a list with components:

data

time series.

X

matrix of exogenous variables.

estimates

estimated values.

residuals

residuals.

sresi

standardized residuals.

Examples

x=rnorm(1000)*0.1
y=matrix(0,1000,1)
y[1]=2
lambda=matrix(0,1000,1)
for (i in 2:1000){
	lambda[i]=2+0.2*y[i-1]/exp(x[i-1])+0.5*lambda[i-1]
	y[i]=rpois(1,exp(x[i])*lambda[i])
}
ACMx(y,order=c(1,1),x,"po")

NTS documentation built on Sept. 25, 2023, 1:08 a.m.

Related to ACMx in NTS...