autocov: Theoretical autocovariances of an ARMA model

autocov.ssmR Documentation

Theoretical autocovariances of an ARMA model

Description

autocov computes the autocovariances of an ARMA model.

Usage

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

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

autocov(mdl, ...)

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

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.

Value

A numeric vector.

Note

The I polynomial is ignored.

Examples

# 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)


tfarima documentation built on Nov. 5, 2025, 7:43 p.m.