| tsqr.fit | R Documentation |
This function computes trigonometric spline quantile regression (TSQR) for
univariate time series at a single frequency using sqr.fit(), sqr1.fit(), or sqr3.fit().
tsqr.fit(
y,
f0,
tau,
tau0 = tau,
spar = 1,
w = rep(1, length(tau0)),
mthreads = FALSE,
prepared = TRUE,
method = c("sqr", "sqr1", "sqr3"),
ztol = NULL,
solver = NULL,
all.knots = FALSE,
control = list()
)
y |
time series |
f0 |
frequency in [0,1) |
tau |
sequence of quantile levels for evaluation |
tau0 |
sequence of quantile levels for fitting ( |
spar |
smoothing parameter (default = 1) |
w |
weight sequence in penalty (default = |
mthreads |
if |
prepared |
if |
method |
|
ztol |
a zero tolerance paramete to determine the model complexity
(default = |
solver |
|
all.knots |
|
control |
list of control parameters for QP solvers |
object of sqr.fit(), sqr1.fit(), or sqr3.fit()
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)
fit <- tqr.fit(y,f0=0.1,tau=tau)
fit.sqr1 <- tsqr.fit(y,f0=0.1,tau=tau,tau0=tau0,spar=0.2,method='sqr1')
fit.sqr3 <- tsqr.fit(y,f0=0.1,tau=tau,tau0=tau0,spar=1,method='sqr3')
plot(tau,fit$coef[1,],type='p',xlab='QUANTILE LEVEL',ylab='TQR COEF')
lines(tau,fit.sqr1$coef[1,])
lines(tau,fit.sqr3$coef[1,],col=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.