| qspec.lwqs {qfa} | R Documentation | 
Lag-Window-Quantile-Smoothing (LWQS) Estimator of Quantile Spectrum
Description
This function computes lag-window-quantile-smoothing (LWQS) estimate of quantile spectrum/cross-spectrum from time series or quantile autocovariance function (QACF).
Usage
qspec.lwqs(
  y,
  tau,
  y.qacf = NULL,
  M = NULL,
  method = c("gamm", "sp"),
  spar = "GCV",
  n.cores = 1,
  cl = NULL
)
Arguments
| y | vector or matrix of time series (if matrix,  | 
| tau | sequence of quantile levels in (0,1) | 
| y.qacf | matrix or array of pre-calculated QACF (default =  | 
| M | bandwidth parameter of lag window (default =  | 
| method | smoothing method:  | 
| spar | smoothing parameter in  | 
| n.cores | number of cores for parallel computing (default = 1) | 
| cl | pre-existing cluster for repeated parallel computing (default =  | 
Value
A list with the following elements:
| spec | matrix or array of quantile spectrum/cross-spectrum | 
| spec.lw | matrix or array of quantile spectrum/cross-spectrum without quantile smoothing | 
| lw | lag-window sequence | 
| qacf | matrix or array of quantile autocovariance function if  | 
Examples
y1 <- stats::arima.sim(list(order=c(1,0,0), ar=0.5), n=64)
y2 <- stats::arima.sim(list(order=c(1,0,0), ar=-0.5), n=64)
tau <- seq(0.1,0.9,0.05)
n <- length(y1)
ff <- c(0:(n-1))/n
sel.f <- which(ff > 0 & ff < 0.5)
y.qper.lwqs <- qspec.lwqs(cbind(y1,y2),tau,M=5,method="sp",spar=0.9)$spec
qfa.plot(ff[sel.f],tau,Re(y.qper.lwqs[1,1,sel.f,]))