tsqr.fit {qfa} | R Documentation |
Trigonometric Spline Quantile Regression (TSQR)
Description
This function computes trigonometric spline quantile regression (TSQR) for univariate time series at a single frequency.
Usage
tsqr.fit(y, f0, tau, c0, d = 1, weighted = FALSE, prepared = TRUE)
Arguments
y |
vector of time series |
f0 |
frequency in [0,1) |
tau |
sequence of quantile levels in (0,1) |
c0 |
penalty parameter |
d |
subsampling rate of quantile levels (default = 1) |
weighted |
if |
prepared |
if |
Value
object of sqr.fit()
(coefficients in $coef
)
Examples
y <- stats::arima.sim(list(order=c(1,0,0), ar=0.5), n=64)
tau <- seq(0.1,0.9,0.05)
fit <- tqr.fit(y,f0=0.1,tau=tau)
fit.sqr <- tsqr.fit(y,f0=0.1,tau=tau,c0=0.02,d=4)
plot(tau,fit$coef[1,],type='p',xlab='QUANTILE LEVEL',ylab='TQR COEF')
lines(tau,fit.sqr$coef[1,],type='l')
[Package qfa version 2.1 Index]