sqdft {qfa} | R Documentation |
Spline Quantile Discrete Fourier Transform (SQDFT)
Description
This function computes spline quantile discrete Fourier transform (SQDFT) for univariate or multivariate time series through trigonometric spline quantile regression.
Usage
sqdft(y, tau, c0 = 0.02, d = 4, weighted = FALSE, n.cores = 1, cl = NULL)
Arguments
y |
vector or matrix of time series (if matrix, |
tau |
sequence of quantile levels in (0,1) |
c0 |
penalty parameter |
d |
subsampling rate of quantile levels (default = 1) |
weighted |
if |
n.cores |
number of cores for parallel computing (default = 1) |
cl |
pre-existing cluster for repeated parallel computing (default = |
Value
matrix or array of the spline quantile discrete Fourier transform of y
Examples
y <- stats::arima.sim(list(order=c(1,0,0), ar=0.5), n=64)
tau <- seq(0.1,0.9,0.05)
y.sqdft <- sqdft(y,tau,c0=0.02,d=4)
n <- length(y)
ff <- c(0:(n-1))/n
sel.f <- which(ff > 0 & ff < 0.5)
y.qacf <- qdft2qacf(y.sqdft)
y.qper.sqrlw <- qspec.lw(y.qacf,M=5)$spec
qfa.plot(ff[sel.f],tau,Re(y.qper.sqrlw[sel.f,]))
[Package qfa version 2.1 Index]