The purpose of this vignette is to present the calculations for a
peicewise quantile regression where for each time step there are
multiple independent observations.
In the follow variables identified by Greek letters are considered
unknown.
Quantile regression
Data belongs to group
whose time stamps are the set
which have common regression parameters
and residual variance
At time step
the vector of iid observations
is explained by the design matrix
.
For a given quantile
and using the check function
Koenker and Bassett (1978) show that an estimate of
in QR model can be obtained by solving the convex optimization problem
Solving this gives the maximum likelihood estimator of the asymmetric
Laplace (AL) distributions (Geraci and Bottai, 2007 and Yu, Lu, and
Stander, 2003) which has likelihood
With
the log likelihood is given by
The log-likelihood of
is with
with the cost being twice the negative log likelihood plus a penalty
giving
Baseline: No Anomaly
Here
and is no penalty so
Collective anomaly
Estimate
using ??? and then with penalty
Point Anomaly
if
then could proceed like a collective anomaly. Otherwise select
such that $\mathbf{y}}_{t,i} -
\mathbf{X}_{t,i}\hat{\theta}_{k}= 0$