sqdft: Spline Quantile Discrete Fourier Transform (SQDFT) of Time...

View source: R/qfa5.0.R

sqdftR Documentation

Spline Quantile Discrete Fourier Transform (SQDFT) of Time Series

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,
  tau0 = tau,
  spar = NULL,
  w = rep(1, length(tau0)),
  criterion = c("AIC", "BIC", "GIC"),
  method = c("sqr", "sqr1", "sqr3"),
  ztol = NULL,
  solver = NULL,
  interval = NULL,
  all.knots = FALSE,
  control = list(),
  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 for evaluation

tau0

sequence of quantile levels for fitting (min(tau0) <= tau <= max(tau0); default = tau)

spar

smoothing parameter, selected automatically by criterion if spar = NULL or if length(spar) > 1

w

weight sequence in penalty (default = rep(1,length(tau0)))

criterion

criterion for smoothing parameter selection: "AIC" (default), "BIC", or "GIC"

method

'sqr'(default), 'sqr1', or 'sqr3'

ztol

zero-tolerance parameter to determine the model complexity (default = NULL: set internally to 1e-5 for SQR and SQR1 or 1e-4 for SQR3)

solver

'fnb' or 'sfn' for SQR and SQR1; 'piqp' or 'osqp' for SQR3 (default = NULL: set internally to 'fnb' for SQR and SQR1 or 'piqp' for SQR3)

interval

interval for spar optimization (default: c(-1.5,1.5) for SQR and SQR1 or c(0,2.5) for SQR3)

all.knots

TRUE or FALSE (default), as in stats::smooth.spline()

control

list of control parameters for QP solvers 'piqp' and 'osqp' (default = list())

n.cores

number of cores for parallel computing (default = 1)

cl

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

Value

A list with the following elements:

coefficients

matrix of regression coefficients

qdft

matrix or array of the spline quantile discrete Fourier transform of y

crit

criteria for smoothing parameter selection: (AIC,BIC,GIC)

nit

maximum number of iterations

spar

optimal value of smoothing parameter

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,spar=0.2,method="sqr1")$qdft
plot(y.sqdft[,2])

qfa documentation built on March 30, 2026, 5:07 p.m.

Related to sqdft in qfa...