Learn R Programming

qfa (version 4.0)

qper: Quantile Periodogram (QPER)

Description

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

Usage

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

Value

matrix or array of quantile periodogram

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)

Examples

Run this code
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)  

Run the code above in your browser using DataLab