Learn R Programming

weakARMA (version 1.0.3)

acf.univ: Computation of autocovariance and autocorrelation for an ARMA residuals.

Description

Computes empirical autocovariances and autocorrelations functions for an ARMA process for only one given lag.

Usage

acf.univ(ar = NULL, ma = NULL, y, h, e = NULL)

Arguments

ar

Vector of AR coefficients. If NULL, it is a MA process.

ma

Vector of MA coefficients. If NULL, it is a AR process.

y

Univariate time series.

h

Given lag to compute autocovariance and autocorrelation, with h an integer.

e

Vector of residuals of the time series. If NULL, the function will compute it.

Value

A list with :

autocov

Value of the autocovariance.

autocor

Value of the autocorrelation.

See Also

acf.gamma_m for autocorrelation and autocovariance for all h lag.

Examples

Run this code
# NOT RUN {
param.estim <- estimation(p = 1,  q = 1, y = CAC40return.sq)
# }
# NOT RUN {
acf.univ(ar = param.estim$ar, ma = param.estim$ma, y = CAC40return.sq,  h = 20)
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab