#' Circular index-based block bootstrap for tuples
#'
#' @description This internal function creates the bivariate pairs of
#' indices needed in order for the circular index-based block
#' bootstrap for tuples to be used in the computations
#'
#' @param .indices The initial vector of (resampled) indices.
#'
#' @param .lag The lag-value that should be used.
#'
#' @return This helper function returns a list with two vectors, one
#' named \code{first} and one named \code{second}. These are the
#' indices needed for the circular index-based block bootstrap for
#' tuples.
#'
#' @keywords internal
TS_cibbb_tuples <- function(.indices, .lag) {
.n <- length(.indices)
## Note: The subsetting used in the local Gaussian spectra-papers
## implies that the first subsetting shoud be with regard to 't'
## and the the second subsetting with regard to 't+h'.
.second <- head(x = .indices, n = .n - .lag)
.tmp <- .second + .lag
.first <- .tmp - .n * floor((.tmp - 1)/.n)
return(list(first = .first,
second = .second))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.