Learn R Programming

tfarima (version 0.4.1)

autocov.ssm: Theoretical autocovariances of an ARMA model

Description

autocov computes the autocovariances of an ARMA model.

Usage

# S3 method for ssm
autocov(mdl, lag.max = NULL, arma = TRUE, varphi = FALSE, tol = 1e-04, ...)

# S3 method for ucarima autocov(mdl, ma = FALSE, ...)

autocov(mdl, ...)

# S3 method for um autocov(mdl, lag.max = 10, ...)

Value

A numeric vector.

Arguments

mdl

an object of class um or ucm.

lag.max

maximum lag for autocovariances.

arma

logical. If TRUE, the autocovariances for the stationary ARMA model of the reduced form are computed. Otherwise, the autocovariances are only computed for the MA part.

varphi

logical. If TRUE, the varphi polynomial of the reduced form is also returned.

tol

tolerance to check if a root is close to one.

...

additional arguments.

ma

logical; if true, autocovariances are computed for the MA model. By default, ma = FALSE and autocovariances are computed for the ARMA model.

Examples

Run this code
# Local level model
ssm1 <- ssm(b = 1, C = 1, S = diag(c(irr = 0.8, lvl = 0.04)))
autocov(ssm1)

ar1 <- um(ar = "1-0.8B")
autocov(ar1, lag.max = 13)

Run the code above in your browser using DataLab