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

View source: R/qfa5.0.R

sqdft.fitR Documentation

Spline Quantile Discrete Fourier Transform (SQDFT) of Time Series Given Smoothing Parameter

Description

This function computes spline quantile discrete Fourier transform (SQDFT) for univariate or multivariate time series through trigonometric spline quantile regression with user-supplied spar.

Usage

sqdft.fit(
  y,
  tau,
  tau0 = tau,
  spar = 1,
  w = rep(1, length(tau0)),
  method = c("sqr", "sqr1", "sqr3"),
  ztol = NULL,
  solver = 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 (default = 1)

w

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

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)

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

Examples

y <- stats::arima.sim(list(order=c(1,0,0), ar=0.5), n=64)
tau <- seq(0.1,0.9,0.05)
tau0 <- seq(0.1,0.9,0.2)
y.sqdft <- sqdft.fit(y,tau,tau0=tau0,spar=0.2,method="sqr1")$qdft

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

Related to sqdft.fit in qfa...