ACMx: Estimation of Autoregressive Conditional Mean Models

Description Usage Arguments Value Examples

Description

Estimation of autoregressive conditional mean models with exogenous variables.

Usage

1
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

1
2
3
4
5
6
7
8
9
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 Aug. 6, 2020, 5:08 p.m.

Related to ACMx in NTS...