This function computes spline quantile discrete Fourier transform (SQDFT) for univariate or multivariate time series through trigonometric spline quantile regression.
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
)A list with the following elements:
matrix of regression coefficients
matrix or array of the spline quantile discrete Fourier transform of y
criteria for smoothing parameter selection: (AIC,BIC,GIC)
maximum number of iterations
optimal value of smoothing parameter
vector or matrix of time series (if matrix, nrow(y) = length of time series)
sequence of quantile levels for evaluation
sequence of quantile levels for fitting (min(tau0) <= tau <= max(tau0);
default = tau)
smoothing parameter, selected automatically by criterion if spar = NULL or if length(spar) > 1
weight sequence in penalty (default = rep(1,length(tau0)))
criterion for smoothing parameter selection: "AIC" (default), "BIC", or "GIC"
'sqr'(default), 'sqr1', or 'sqr3'
zero-tolerance parameter to determine the model complexity
(default = NULL: set internally to 1e-5 for SQR and SQR1 or 1e-4 for SQR3)
'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 for spar optimization (default: c(-1.5,1.5) for SQR and SQR1
or c(0,2.5) for SQR3)
TRUE or FALSE (default), as in stats::smooth.spline()
list of control parameters for QP solvers 'piqp' and 'osqp' (default = list())
number of cores for parallel computing (default = 1)
pre-existing cluster for repeated parallel computing (default = NULL)
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])
Run the code above in your browser using DataLab