R/RcppExports.R

Defines functions .computeSdNaive .computeCoherency

Documented in .computeCoherency .computeSdNaive

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Workhorse function for \code{\link{getCoherency-SmoothedPG}}.
#'
#' C++ implementation to increase performance.
#'
#' @name .computeCoherency
#'
#' @keywords internals
#'
#' @param V a 3-dimensional array of complex numbers; dimensions are
#'          \code{[N, K1, K2]}, where \code{N} frequencies are
#'          \eqn{\omega_j := 2\pi j/N} for \eqn{j=0,\ldots,N}.
#' @param W a vector of length \code{W} of length \code{N} used for smoothing.
#'
#' @return Returns an array with complex numbers
#'         \eqn{\sigma(\tau_1, \tau_2, \omega_j} as defined in
#'         Kley et. al (2016), p. 26.
#'
#' @references
#' Barunik, J. & Kley, T. (2019).
#' Quantile Coherency: A General Measure for Dependence Between Cyclical
#' Economic Variables. Econometrics Journal, 22, 131--152.
#' \url{http://arxiv.org/abs/1401.8104}.
NULL

.computeCoherency <- function(V, d1, d2) {
    .Call('_quantspec_computeCoherency', PACKAGE = 'quantspec', V, d1, d2)
}

#' Workhorse function for \code{\link{getSdNaive-SmoothedPG}}.
#'
#' C++ implementation to increase performance.
#'
#' @name .computeSdNaive
#'
#' @keywords internals
#'
#' @param V a 3-dimensional array of complex numbers; dimensions are
#'          \code{[N, K1, K2]}, where \code{N} frequencies are
#'          \eqn{\omega_j := 2\pi j/N} for \eqn{j=0,\ldots,N}.
#' @param W a vector of length \code{W} of length \code{N} used for smoothing.
#'
#' @return Returns an array with complex numbers
#'         \eqn{\sigma(\tau_1, \tau_2, \omega_j} as defined in
#'         Kley et. al (2016), p. 26.
#'
#' @references
#' Dette, H., Hallin, M., Kley, T. & Volgushev, S. (2015).
#' Of Copulas, Quantiles, Ranks and Spectra: an \eqn{L_1}{L1}-approach to
#' spectral analysis. \emph{Bernoulli}, \bold{21}(2), 781--831.
#' [cf. \url{http://arxiv.org/abs/1111.7205}]
NULL

.computeSdNaive <- function(V, W) {
    .Call('_quantspec_computeSdNaive', PACKAGE = 'quantspec', V, W)
}

Try the quantspec package in your browser

Any scripts or data that you put into this service are public.

quantspec documentation built on July 15, 2020, 1:07 a.m.