qper {qfa}R Documentation

Quantile Periodogram and Cross-Periodogram (QPER)

Description

This function computes quantile periodogram/cross-periodogram (QPER) from time series or quantile discrete Fourier transform (QDFT).

Usage

qper(y, tau, y.qdft = NULL, n.cores = 1, cl = NULL)

Arguments

y

vector or matrix of time series (if matrix, nrow(y) = length of time series)

tau

sequence of quantile levels in (0,1)

y.qdft

matrix or array of pre-calculated QDFT (default = NULL: compute from y and tau); if y.qdft is supplied, y and tau can be left unspecified

n.cores

number of cores for parallel computing of QDFT if y.qdft = NULL (default = 1)

cl

pre-existing cluster for repeated parallel computing of QDFT (default = NULL)

Value

matrix or array of quantile periodogram/cross-periodogram

Examples

y <- stats::arima.sim(list(order=c(1,0,0), ar=0.5), n=64)
tau <- seq(0.1,0.9,0.05)
# compute from time series
y.qper <- qper(y,tau)  
# compute from QDFT 
y.qdft <- qdft(y,tau) 
y.qper <- qper(y.qdft=y.qdft)  

[Package qfa version 2.1 Index]