Learn R Programming

ADTSA (version 1.0.1)

MB_Ac: Estimating autocorrelations for vectorized moving block

Description

This function calculates autocorrelations for vectorized moving block bootstrap samples based on the position indices of pairs of observations.

Usage

MB_Ac(pair_mat, ts)

Value

a vector of estimated autocorrelations.

Arguments

pair_mat

a list of position indices of pairs of observations to calculate autocorrelations. An object returned by the function pairwise_MBL.

ts

a numeric vector of time series data.

Author

Hossein hassani, Masoud yarmohammadi, Mohammad reza yeganegi and Leila Marvian Mashhad.

Details

If there are missing values, this function estimates autocorrelations assuming complete data. Therefore, in such cases, the result is not valid.

Examples

Run this code
mat <- matrix(c(1, 2, 3, 4, 5, 6), nrow = 3, ncol = 2)
ts <- 1:6
lgmx <- 2
l_ts <- 5
pair_mat1 = pairwise_MBL(mat, lgmx, l_ts)
MB_Ac(pair_mat1, ts)

Run the code above in your browser using DataLab