Quantile/expectile regression, and extreme data analysis
Quantile/expectile regression, and extreme data analysis
Quantile/expectile regression, and extreme data analysis
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong><br />
<strong>analysis</strong><br />
© T. W. Yee<br />
University of Auckl<strong>and</strong><br />
18 July 2012 @ Cagliari<br />
t.yee@auckl<strong>and</strong>.ac.nz<br />
http://www.stat.auckl<strong>and</strong>.ac.nz/~yee<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 1/101 1 / 101
Outline of this document<br />
Outline of this document<br />
1 LMS quantile <strong>regression</strong><br />
2 Expectile <strong>regression</strong><br />
3 Asymmetric MLE<br />
4 Asymmetric Laplace distribution<br />
5 Extreme value <strong>data</strong> <strong>analysis</strong><br />
6 Concluding remarks<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 2/101 2 / 101
LMS quantile <strong>regression</strong><br />
Introduction to quantile <strong>regression</strong> I<br />
Some motivation<br />
Q: Why quantile <strong>regression</strong>?<br />
A: Because<br />
there is no information loss: cdf F contains all the information about<br />
a r<strong>and</strong>om variable,<br />
sometimes the tails are of more interest than in the central area.<br />
Applications of quantile <strong>regression</strong> come from many fields. Here are<br />
some.<br />
Medical examples include investigating height, weight, body mass<br />
index (BMI) as a function of age of the person. Historically, the<br />
construction of ‘growth charts’ was probably the first example of<br />
age-related reference intervals. Another example is Campbell <strong>and</strong><br />
Newman (1971)—the ultrasonographic assessment of fetal growth has<br />
become clinically routine.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 3/101 3 / 101
LMS quantile <strong>regression</strong><br />
Introduction to quantile <strong>regression</strong> II<br />
Some motivation<br />
Economics, e.g., it has been used to study determinants of wages,<br />
discrimination effects, <strong>and</strong> trends in income inequality. See<br />
Koenker (2005) for more references.<br />
Education, e.g., the performance of students in public schools on<br />
st<strong>and</strong>ardized exams as a function of socio-economic variables such as<br />
parents’ income <strong>and</strong> educational attainment.<br />
Climate <strong>data</strong>, e.g., the Melbourne temperature <strong>data</strong> exhibits bimodal<br />
behaviour.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 4/101 4 / 101
LMS quantile <strong>regression</strong><br />
Introduction to quantile <strong>regression</strong> III<br />
Some motivation<br />
40<br />
Today's Max Temperature<br />
30<br />
20<br />
10<br />
10 20 30 40<br />
Yesterday's Max Temperature<br />
Figure: Melbourne temperature <strong>data</strong> ( ◦ C). These are daily maximum<br />
temperatures during 1981–1990, n = 3650. Y = each day’s maximum<br />
temperature, X = the previous day’s maximum temperature.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 5/101 5 / 101
LMS quantile <strong>regression</strong><br />
Introduction to quantile <strong>regression</strong> IV<br />
Some motivation<br />
Figure: Map of Australia.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 6/101 6 / 101
LMS quantile <strong>regression</strong><br />
Growth chart example<br />
Boys’ height.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 7/101 7 / 101
LMS quantile <strong>regression</strong><br />
Growth chart example<br />
Girls’ height <strong>and</strong> weight.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 8/101 8 / 101
LMS quantile <strong>regression</strong><br />
Three subclasses I<br />
The R package VGAM implements 3 subclasses of models for<br />
quantile/<strong>expectile</strong> <strong>regression</strong>.<br />
1 LMS-type methods. These transform the response to some<br />
parametric distribution (e.g., Box-Cox to N(0, 1)). Estimated<br />
quantiles on the transformed scale are back-transformed on to the<br />
original scale Cole <strong>and</strong> Green (1992).<br />
2 Expectile <strong>regression</strong> methods. If quantiles can be described as being<br />
based on first-order moments then <strong>expectile</strong>s are second-order<br />
moments.<br />
3 Asymmetric Laplace distribution (ALD) models. These exploit the<br />
property that the MLE of the location parameter of an ALD<br />
corresponds to the classical quantile <strong>regression</strong> estimator Koenker <strong>and</strong><br />
Bassett (1978).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 9/101 9 / 101
LMS quantile <strong>regression</strong><br />
LMS quantile <strong>regression</strong> I<br />
First method: the Cole-Green method<br />
Will use an approximate r<strong>and</strong>om sample of 700 adults. 18 ≤ age ≤ 85.<br />
Y = Body Mass Index (BMI; weight ÷ height 2 , kg m −2 ), a measure of<br />
obesity.<br />
60<br />
●<br />
●<br />
50<br />
●<br />
●<br />
BMI<br />
40<br />
30<br />
20<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
●<br />
● ● ●●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●●<br />
● ●<br />
● ●<br />
●<br />
●<br />
● ● ●<br />
● ●<br />
● ●<br />
● ●●<br />
● ●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●<br />
● ●●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
● ● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ●<br />
●<br />
●<br />
●●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ● ●<br />
●<br />
●<br />
● ●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●● ● ● ●<br />
● ●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
20 30 40 50 60 70 80<br />
age<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 10/101/ 101
LMS quantile <strong>regression</strong><br />
LMS quantile <strong>regression</strong> II<br />
First method: the Cole-Green method<br />
For scatterplot <strong>data</strong> (x i , y i ), the LMS method assumes a Box-Cox power<br />
transformation of the y i , given x i , is st<strong>and</strong>ard normal. That is,<br />
⎧<br />
( Y<br />
Z =<br />
⎪⎨<br />
⎪⎩<br />
) λ(x)<br />
− 1<br />
µ(x)<br />
σ(x) λ(x)<br />
( )<br />
1 Y<br />
σ(x) log µ(x)<br />
, λ(x) ≠ 0;<br />
, λ(x) = 0,<br />
(1)<br />
is N(0, 1). “LMS” ≡ λ, µ, σ. Because σ > 0, default is<br />
η(x) = (λ(x), µ(x), log(σ(x))) T .<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 11/101/ 101
LMS quantile <strong>regression</strong><br />
LMS quantile <strong>regression</strong> III<br />
First method: the Cole-Green method<br />
Given ̂η, the 100α% quantile (e.g., α = 50 for median) is<br />
[<br />
̂µ(x) 1 + ̂λ(x)<br />
1/ λ(x)<br />
̂σ(x) Φ (α/100)] −1 b<br />
. (2)<br />
i.e., apply the inverse Box-Cox transformation to N(0, 1) quantiles. Easy!<br />
A problem with the LMS method is to find justification for the underlying<br />
method.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 12/101/ 101
LMS quantile <strong>regression</strong><br />
Using the gamma model avoids a range of problems:<br />
It has finite expectations of the required derivatives of the likelihood<br />
function (not so for the normal version, particularly when σ is small.)<br />
The off-diagonal elements of the W i are 0 (or ≈ 0) (relative to the<br />
diagonal elts).<br />
Unlike the normal case, the range of transformation does not depend<br />
on λ. Thus, in the gamma model Y ranges over (0, ∞) for all λ, µ<br />
<strong>and</strong> σ.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 13/101/ 101<br />
Second Method: The LMS Gamma Method†<br />
Lopatatzidis <strong>and</strong> Green (1998) proposed transforming Y to a gamma<br />
distribution—it has some theoretical <strong>and</strong> practical advantages. Then<br />
W<br />
= (Y /µ) λ<br />
is assumed gamma with unit mean <strong>and</strong> variance λ 2 σ 2 . The 100α percentile<br />
of Y at x is µ(x) Wα<br />
1/λ(x) where W α is the equivalent deviate of size α for<br />
the gamma distribution with mean 1 <strong>and</strong> variance λ(x) 2 σ(x) 2 .
LMS quantile <strong>regression</strong><br />
Third Method: The Yeo-Johnson transformation† I<br />
Yeo <strong>and</strong> Johnson (2000) introduce a new power transformation which is<br />
well defined on the whole real line, <strong>and</strong> potentially useful for improving<br />
normality:<br />
ψ(λ, y) =<br />
⎧<br />
⎪⎨<br />
⎪⎩<br />
λ = 1 = the identity transformation.<br />
(y + 1) λ − 1<br />
(y ≥ 0, λ ≠ 0),<br />
λ<br />
log(y + 1) (y ≥ 0, λ = 0),<br />
− (−y + 1)2−λ − 1<br />
(y < 0, λ ≠ 2),<br />
2 − λ<br />
− log(−y + 1) (y < 0, λ = 2).<br />
The Yeo-Johnson transformation is equivalent to the generalized Box-Cox<br />
transformation for y > −1 where the shift constant 1 is included.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 14/101/ 101
LMS quantile <strong>regression</strong><br />
Box−Cox transformation of y<br />
3<br />
2<br />
1<br />
0<br />
−1<br />
−2<br />
−5<br />
−3<br />
0<br />
1<br />
3<br />
5<br />
−3<br />
−3 −2 −1 0 1 2 3<br />
y<br />
Figure: The Box-Cox transformation (y λ − 1)/λ.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 15/101/ 101
LMS quantile <strong>regression</strong><br />
Yeo−Johnson transformation of y<br />
3<br />
2<br />
1<br />
0<br />
−1<br />
−2<br />
−5<br />
−3<br />
0<br />
1<br />
3<br />
5<br />
−3<br />
−3 −2 −1 0 1 2 3<br />
y<br />
Figure: The Yeo-Johnson transformation ψ(λ, y).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 16/101/ 101
LMS quantile <strong>regression</strong><br />
VGAM software for quantile/<strong>expectile</strong> <strong>regression</strong><br />
VGAM family functions for quantile/<strong>expectile</strong> <strong>regression</strong>.<br />
lms.bcn() Box-Cox transformation to normality<br />
lms.bcg() Box-Cox transformation to gamma distribution<br />
lms.yjn() Yeo-Johnson transformation to normality<br />
amlnormal() Asymmetric least squares<br />
amlbinomial() Asymmetric maximum likelihood—for binomial<br />
amlpoisson() Asymmetric maximum likelihood—for Poisson<br />
amlexponential() Asymmetric maximum likelihood—for exponential<br />
alaplace1() AL ∗ (ξ) with known σ, <strong>and</strong> κ (or τ)<br />
alaplace2() AL ∗ (ξ, σ) with known κ (or τ)<br />
alaplace3() AL ∗ (ξ, σ, κ)<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 17/101/ 101
LMS quantile <strong>regression</strong><br />
lms. functions I<br />
> args(lms.bcn)<br />
function (percentiles = c(25, 50, 75), zero = c(1, 3), llambda = "identity",<br />
lmu = "identity", lsigma = "loge", elambda = list(), emu = list(),<br />
esigma = list(), dfmu.init = 4, dfsigma.init = 2, ilambda = 1,<br />
isigma = NULL, <strong>expectile</strong>s = FALSE)<br />
NULL<br />
> args(lms.bcg)<br />
function (percentiles = c(25, 50, 75), zero = c(1, 3), llambda = "identity",<br />
lmu = "identity", lsigma = "loge", elambda = list(), emu = list(),<br />
esigma = list(), dfmu.init = 4, dfsigma.init = 2, ilambda = 1,<br />
isigma = NULL)<br />
NULL<br />
> args(lms.yjn)<br />
function (percentiles = c(25, 50, 75), zero = c(1, 3), llambda = "identity",<br />
lsigma = "loge", elambda = list(), esigma = list(), dfmu.init = 4,<br />
dfsigma.init = 2, ilambda = 1, isigma = NULL, rule = c(10,<br />
5), yoffset = NULL, diagW = FALSE, iters.diagW = 6)<br />
NULL<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 18/101/ 101
LMS quantile <strong>regression</strong><br />
Cole <strong>and</strong> Green (1992) advocated estimation by penalized likelihood using<br />
splines. Their penalized log-likelihood was<br />
n∑<br />
l i − 1 2 λ λ<br />
i=1<br />
which is a special case of<br />
∫ {λ ′′ (t) } ∫<br />
2 1 {µ<br />
dt −<br />
2 λ µ<br />
′′ (t) } ∫<br />
2 1 {σ<br />
dt −<br />
2 λ σ<br />
′′ (t) } 2 dt,<br />
n∑<br />
i=1<br />
l i − 1 2<br />
p∑<br />
M∑<br />
k=1 j=1<br />
λ (j)k<br />
∫ {<br />
f ′′<br />
(j)k (x k)} 2<br />
dxk . (3)<br />
This is exactly the VGAM framework!<br />
Of the three functions, it is often a good idea to allow µ(x) to be more<br />
flexible <strong>and</strong>/or set λ <strong>and</strong> σ to be an intercept term only, e.g., s(x2, df =<br />
c(1, 4, 1)) or lms.bcn(zero = c(1, 3)).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 19/101/ 101
LMS quantile <strong>regression</strong><br />
Example with bmi.nz I<br />
> fit = vgam(BMI ~ s(age, df = c(1, 4, 1)), trace = FALSE,<br />
fam = lms.bcn(zero = NULL), bmi.nz)<br />
> qtplot(fit, pcol = "blue", tcol = "orange", lcol = "orange")<br />
20 30 40 50 60 70 80 90<br />
20<br />
30<br />
40<br />
50<br />
60<br />
age<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
25%<br />
50%<br />
75%<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 20/101<br />
18 July 2012 @ Cagliari 20 / 101
LMS quantile <strong>regression</strong><br />
Example with bmi.nz II<br />
Q: Why the decrease at older years?<br />
A:<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 21/101/ 101
LMS quantile <strong>regression</strong><br />
Example with bmi.nz III<br />
Q: Why the decrease at older years?<br />
A: Selection bias due to premature death of obese people.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 22/101/
LMS quantile <strong>regression</strong><br />
Example with bmi.nz IV<br />
> ygrid = seq(15, 43, len = 100) # BMI ranges<br />
> mycols aa = deplot(fit, x0 = 20, y = ygrid, xlab = "BMI", col = mycols[1],<br />
main = "Estimated density functions")<br />
> aa = deplot(fit, x0 = 42, y = ygrid, add = TRUE,<br />
col = mycols[2])<br />
> aa = deplot(fit, x0 = 55, y = ygrid, add = TRUE,<br />
col = mycols[3], Attach = TRUE)<br />
> legend("topright", col = mycols, lty = 1,<br />
c("20 year olds", "42 year olds", "55 year olds"))<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 23/101/
LMS quantile <strong>regression</strong><br />
Example with bmi.nz V<br />
Estimated density functions<br />
0.10<br />
20 year olds<br />
42 year olds<br />
55 year olds<br />
0.08<br />
density<br />
0.06<br />
0.04<br />
0.02<br />
0.00<br />
15 20 25 30 35 40<br />
BMI<br />
Figure: Density plot at various ages.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 24/101/
LMS quantile <strong>regression</strong><br />
Example with bmi.nz VI<br />
> aa@post$deplot # Contains density function values<br />
$new<strong>data</strong><br />
age<br />
1 55<br />
$y<br />
[1] 15.00 15.28 15.57 15.85 16.13 16.41 16.70 16.98 17.26<br />
[10] 17.55 17.83 18.11 18.39 18.68 18.96 19.24 19.53 19.81<br />
[19] 20.09 20.37 20.66 20.94 21.22 21.51 21.79 22.07 22.35<br />
[28] 22.64 22.92 23.20 23.48 23.77 24.05 24.33 24.62 24.90<br />
[37] 25.18 25.46 25.75 26.03 26.31 26.60 26.88 27.16 27.44<br />
[46] 27.73 28.01 28.29 28.58 28.86 29.14 29.42 29.71 29.99<br />
[55] 30.27 30.56 30.84 31.12 31.40 31.69 31.97 32.25 32.54<br />
[64] 32.82 33.10 33.38 33.67 33.95 34.23 34.52 34.80 35.08<br />
[73] 35.36 35.65 35.93 36.21 36.49 36.78 37.06 37.34 37.63<br />
[82] 37.91 38.19 38.47 38.76 39.04 39.32 39.61 39.89 40.17<br />
[91] 40.45 40.74 41.02 41.30 41.59 41.87 42.15 42.43 42.72<br />
[100] 43.00<br />
$density<br />
[1] 4.589e-05 7.826e-05 1.293e-04 2.076e-04 3.240e-04<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 25/101/
LMS quantile <strong>regression</strong><br />
Example with bmi.nz VII<br />
[6] 4.927e-04 7.308e-04 1.059e-03 1.501e-03 2.083e-03<br />
[11] 2.835e-03 3.785e-03 4.965e-03 6.403e-03 8.125e-03<br />
[16] 1.016e-02 1.251e-02 1.520e-02 1.822e-02 2.157e-02<br />
[21] 2.524e-02 2.920e-02 3.341e-02 3.783e-02 4.242e-02<br />
[26] 4.712e-02 5.188e-02 5.662e-02 6.129e-02 6.582e-02<br />
[31] 7.016e-02 7.425e-02 7.803e-02 8.147e-02 8.453e-02<br />
[36] 8.717e-02 8.937e-02 9.112e-02 9.241e-02 9.324e-02<br />
[41] 9.362e-02 9.356e-02 9.307e-02 9.219e-02 9.094e-02<br />
[46] 8.935e-02 8.745e-02 8.528e-02 8.286e-02 8.024e-02<br />
[51] 7.745e-02 7.452e-02 7.149e-02 6.838e-02 6.523e-02<br />
[56] 6.205e-02 5.888e-02 5.573e-02 5.262e-02 4.957e-02<br />
[61] 4.660e-02 4.371e-02 4.092e-02 3.823e-02 3.564e-02<br />
[66] 3.318e-02 3.083e-02 2.860e-02 2.648e-02 2.449e-02<br />
[71] 2.261e-02 2.084e-02 1.919e-02 1.764e-02 1.620e-02<br />
[76] 1.486e-02 1.361e-02 1.245e-02 1.138e-02 1.039e-02<br />
[81] 9.480e-03 8.638e-03 7.864e-03 7.152e-03 6.500e-03<br />
[86] 5.902e-03 5.355e-03 4.854e-03 4.398e-03 3.981e-03<br />
[91] 3.601e-03 3.256e-03 2.942e-03 2.656e-03 2.397e-03<br />
[96] 2.162e-03 1.949e-03 1.756e-03 1.582e-03 1.424e-03<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 26/101/
LMS quantile <strong>regression</strong><br />
Example with bmi.nz VIII<br />
Two general quantile <strong>regression</strong> problems<br />
1 Most methods cannot h<strong>and</strong>le count <strong>data</strong>, proportions, etc.<br />
Q: LMS-quantile <strong>regression</strong> won’t h<strong>and</strong>le the Melbourne temperature<br />
<strong>data</strong>. Why?<br />
A:<br />
2 Some methods suffer from the “serious embarrassment” 1 of quantile<br />
crossing, e.g., a point (x 0 , y 0 ) may be classified as below the 20th but<br />
above the 30th percentile!<br />
1 see, e.g., He (1997), Sec. 2.5 of Koenker (2005).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 27/101/
LMS quantile <strong>regression</strong><br />
Two quantile <strong>regression</strong> problems<br />
oooooo oooo<br />
o<br />
o<br />
o<br />
ooo<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o o o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
0.0 0.2 0.4 0.6 0.8 1.0<br />
0<br />
5<br />
10<br />
15<br />
x<br />
y<br />
Some Poisson <strong>data</strong>.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 28/101<br />
18 July 2012 @ Cagliari 28 / 101
LMS quantile <strong>regression</strong><br />
Some Poisson <strong>data</strong> with 50 <strong>and</strong> 95 percentiles from qpois().<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 29/101/ Two quantile <strong>regression</strong> problems<br />
y<br />
15<br />
10<br />
5<br />
0<br />
o<br />
o<br />
o o<br />
o<br />
o<br />
o o<br />
o<br />
ooo<br />
o o o<br />
o<br />
o<br />
o o o o o o o o<br />
o oo<br />
o<br />
o<br />
o oo<br />
o oo<br />
o o<br />
o o o<br />
o<br />
o o o o oo o oo<br />
o<br />
o<br />
o oo<br />
o o<br />
o o o o o<br />
o o<br />
oo<br />
o o o o o<br />
o o<br />
o o o o<br />
o<br />
o oo<br />
oo<br />
oo<br />
o o o o<br />
o<br />
o<br />
oo<br />
o<br />
o o<br />
o o o<br />
o oo<br />
o<br />
o o o oo<br />
o o o o<br />
o<br />
o oo<br />
o<br />
o o o oo<br />
oo<br />
o<br />
oo<br />
oo<br />
o o o o<br />
o o o<br />
o o<br />
o o o o ooo<br />
o o<br />
o o o<br />
o o<br />
oo<br />
oo<br />
o oo<br />
oo o o o o<br />
o o<br />
o o o o oo o o o<br />
o<br />
oo<br />
o<br />
o oo<br />
o<br />
o<br />
o o<br />
o<br />
o o<br />
o oo<br />
o o o<br />
o o o o<br />
o<br />
o o o<br />
o o o o o o<br />
o<br />
o oo oo oo oo<br />
o<br />
o<br />
o o o<br />
o<br />
o<br />
ooo<br />
o o o<br />
ooo<br />
o<br />
o o o o o<br />
o o o<br />
o<br />
o o o o o ooo<br />
o<br />
o<br />
o<br />
oo<br />
o o<br />
oo<br />
o ooo<br />
o o<br />
o o o oo<br />
oo<br />
oo o<br />
o<br />
oo<br />
oooooo oooo oooo<br />
ooo<br />
oo<br />
ooo<br />
ooo<br />
ooo<br />
o<br />
o<br />
o<br />
oo<br />
o ooo<br />
o<br />
0.0 0.2 0.4 0.6 0.8 1.0<br />
x
Expectile <strong>regression</strong><br />
Expectile <strong>regression</strong><br />
<strong>Quantile</strong>s:<br />
minimize wrt ξ the quantity E [ρ τ (Y − ξ)] where<br />
ρ τ (u) = u · (τ − I (u < 0)), 0 < τ < 1, (4)<br />
is known as a check function. I call this the “classical” method Koenker<br />
<strong>and</strong> Bassett (1978). See package quantreg.<br />
Expectiles:<br />
[ ]<br />
minimize wrt µ the quantity E ρ [2]<br />
ω (Y − µ) where<br />
ρ [2]<br />
ω (u) = u 2 · |ω − I (u < 0)|, 0 < ω < 1. (5)<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 30/101/
Expectile <strong>regression</strong><br />
Interpretation I<br />
Both have very natural interpretations: given X = x,<br />
quantile ξ τ (x) specifies the position below which 100τ% of the<br />
(probability) mass of Y lies.<br />
<strong>expectile</strong> µ ω (x) determines the point such that 100ω% of the mean<br />
distance between it <strong>and</strong> Y comes from the mass below it.<br />
The 0.5-<strong>expectile</strong> µ( 1 2<br />
) is the mean µ.<br />
The 0.5-quantile ξ( 1 2<br />
) is the median ˜µ.<br />
<strong>Quantile</strong>s are more local whereas <strong>expectile</strong>s are more global <strong>and</strong> are<br />
affected by outliers.<br />
<strong>Quantile</strong>s traditionally are estimated by linear programming whereas<br />
<strong>expectile</strong>s use scoring.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 31/101/ 101
Expectile <strong>regression</strong><br />
Interpretation II<br />
2.0<br />
ω = 0.5<br />
ω = 0.9<br />
(a)<br />
2.0<br />
(b)<br />
1.5<br />
1.5<br />
Loss<br />
1.0<br />
1.0<br />
0.5<br />
0.5<br />
0.0<br />
0.0<br />
−2 −1 0 1 2<br />
−2 −1 0 1 2<br />
Figure: Loss functions for (a) quantile <strong>regression</strong> with τ = 0.5 (L 1 <strong>regression</strong>) <strong>and</strong><br />
τ = 0.9; (b) <strong>expectile</strong> <strong>regression</strong> with ω = 0.5 (least squares) <strong>and</strong> ω = 0.9.<br />
(a) are aka asymmetric absolute loss function or pinball loss function.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 32/101/
Expectile <strong>regression</strong><br />
Expectiles I<br />
Expectiles <strong>and</strong> centers of balance<br />
(d)<br />
c 1 c 2<br />
µ(ω = 0.1)<br />
Figure: Illustration of the interpretation of <strong>expectile</strong>s in terms of centers of<br />
balance, at positions c 1 = △ <strong>and</strong> c 2 = △. This means that (6) is satisfied<br />
with ω = 0.1. Note: the parent distribution is normal.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 33/101/
Expectile <strong>regression</strong><br />
Expectiles II<br />
Expectiles <strong>and</strong> centers of balance<br />
Even simpler interpretation is via centers of balance. From Slide 33, c 1<br />
<strong>and</strong> c 2 denote the centers of balance for the distributions to the LHS <strong>and</strong><br />
RHS of the ω-<strong>expectile</strong> µ(ω). Then<br />
ω =<br />
P[Y < µ(ω)] · (µ(ω) − c 1 )<br />
P[Y < µ(ω)] · (µ(ω) − c 1 ) + P[Y > µ(ω)] · (c 2 − µ(ω))<br />
where c 1 = E[Y |Y < µ(ω)] =<br />
is a fundamental equation. If µ(ω) = 0 then<br />
∫ µ(ω)<br />
−∞<br />
y<br />
[ ] f (y)<br />
dy<br />
F (µ(ω))<br />
(6)<br />
ω =<br />
|c 1 | · F (0)<br />
|c 1 | · F (0) + c 2 · (1 − F (0)) .<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 34/101/
Expectile <strong>regression</strong><br />
Expectiles III<br />
Expectiles <strong>and</strong> centers of balance<br />
Another fundamental equation is<br />
µ = µ(0.5) = P[Y < µ(ω)] · c 1 + P[Y > µ(ω)] · c 2 . (7)<br />
BTW c 1 is related to the expected shortfall, which is used in financial<br />
mathematics—see Slide 40.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 35/101/
Expectile <strong>regression</strong><br />
Interrelationship between <strong>expectile</strong>s <strong>and</strong> quantiles† I<br />
“Expectiles have properties that are similar to quantiles” (Newey <strong>and</strong><br />
Powell, 1987). The reason is that <strong>expectile</strong>s of a distribution F are<br />
quantiles a distribution G which is related to F (Jones, 1994).<br />
The main details are as follows.<br />
Let<br />
P(s) =<br />
∫ s<br />
−∞<br />
y f (y) dy<br />
ρ [1]<br />
τ (u) = τ − I (u ≤ 0),<br />
ρ [2]<br />
ω (u) = |u|(ω − I (u < 0)).<br />
the (first) partial moment,<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 36/101/
Expectile <strong>regression</strong><br />
Interrelationship between <strong>expectile</strong>s <strong>and</strong> quantiles† II<br />
One way of defining the ordinary τ-quantile of a continuous distribution<br />
with density f , 0 < τ < 1, is as the value of ξ that satisfies<br />
∫<br />
ρ [1]<br />
τ (y − ξ) f (y) dy = 0.<br />
In a similar way, for <strong>expectile</strong>s µ(ω), corresponds to the equation<br />
∫<br />
ρ [2]<br />
ω (y − µ(ω)) f (y) dy = 0. (8)<br />
Then solving this equation shows immediately that ω = G(µ(ω)) where<br />
G(t) =<br />
P(t) − tF (t)<br />
2(P(t) − tF (t)) + t − µ . (9)<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 37/101/
Expectile <strong>regression</strong><br />
Interrelationship between <strong>expectile</strong>s <strong>and</strong> quantiles† III<br />
Thus, G is the inverse of the <strong>expectile</strong> function, <strong>and</strong> its derivative is<br />
g(t) =<br />
µF (t) − P(t)<br />
{2(P(t) − tF (t)) + t − µ} 2 . (10)<br />
It can be shown that G is actually a distribution function (so that g is its<br />
density function). That is, the <strong>expectile</strong>s of F are precisely the quantiles<br />
of G defined here.<br />
Table: Density function, distribution function, <strong>and</strong> <strong>expectile</strong> function <strong>and</strong> r<strong>and</strong>om<br />
generation for the distribution associated with the <strong>expectile</strong>s of several<br />
st<strong>and</strong>ardized distributions. These functions are available in VGAM.<br />
Function<br />
[dpqr]eexp()<br />
[dpqr]ekoenker()<br />
[dpqr]enorm()<br />
[dpqr]eunif()<br />
Distribution<br />
Exponential<br />
Koenker<br />
Normal<br />
Uniform<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 38/101/
Expectile <strong>regression</strong><br />
Interrelationship between <strong>expectile</strong>s <strong>and</strong> quantiles† IV<br />
0.6<br />
(a) Normal<br />
2.0<br />
(b) Uniform<br />
0.5<br />
0.4<br />
0.3<br />
1.5<br />
1.0<br />
0.2<br />
0.1<br />
0.5<br />
0.0<br />
0.0<br />
−4 −2 0 2 4<br />
0.0 0.2 0.4 0.6 0.8 1.0<br />
1.0<br />
(c) Exponential<br />
0.4<br />
(d) Koenker<br />
0.8<br />
0.3<br />
0.6<br />
0.4<br />
0.2<br />
0.2<br />
0.1<br />
0.0<br />
0.0<br />
0 1 2 3 4 5<br />
−4 −2 0 2 4<br />
Figure: (a)–(c) Density plots of <strong>expectile</strong> g (purple solid lines) for the original f<br />
of st<strong>and</strong>ard normal, uniform <strong>and</strong> exponential distributions (blue dashed lines);<br />
(d) Koenker’s distribution is the same as a √ 2 T 2 density. Orange line is N(0, 1).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 39/101/
Expectile <strong>regression</strong><br />
Expected shortfall† I<br />
Value at Risk<br />
The expected shortfall (ES) 2 is a concept used in financial mathematics<br />
to measure portfolio risk. Aka<br />
Conditional Value at Risk (CVaR),<br />
expected tail loss (ETL) <strong>and</strong><br />
worst conditional expectation (WCE).<br />
The ES at the 100τ% level is the expected return on the portfolio in the<br />
worst 100τ% of the cases. It is often defined as<br />
ES(τ) = E(Y |Y < a) (11)<br />
where a is determined by P(X < a) = τ <strong>and</strong> τ is the given threshold.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 40/101/
Expectile <strong>regression</strong><br />
Expected shortfall† II<br />
Value at Risk<br />
The ES is very much related to <strong>expectile</strong>s <strong>and</strong> c 1 . That is, the<br />
solution µ(ω) of this minimization satisfies<br />
( 1 − 2ω<br />
ω<br />
)<br />
E [(Y − µ(ω)) · I (Y < µ(ω))] = µ(ω) − E(Y ). (12)<br />
Eqn (12) indicates that the solution µ(ω) is determined by the properties<br />
of the expectation of the r<strong>and</strong>om variable Y conditional on Y<br />
exceeding µ(ω). This suggests a link between <strong>expectile</strong>s <strong>and</strong> ES.<br />
Eqn (12) can be rewritten<br />
(<br />
)<br />
ω<br />
ω<br />
E [Y |Y < µ(ω)] = 1 +<br />
µ(ω)−<br />
E(Y ).<br />
(1 − 2ω)F (µ(ω)) (1 − 2ω)F (µ(ω))<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 41/101/ 101
Expectile <strong>regression</strong><br />
Expected shortfall† III<br />
Value at Risk<br />
This provides a formula for the ES of the quantile that coincides with the<br />
ω-<strong>expectile</strong>. Referring to this as the τ-quantile, we can write F (µ(ω)) = τ<br />
<strong>and</strong> rewrite the expression as<br />
(<br />
ES(τ) = 1 +<br />
ω<br />
(1 − 2ω) τ<br />
)<br />
µ(ω) −<br />
ω<br />
E(Y ). (13)<br />
(1 − 2ω) τ<br />
This equation relates the ES associated with the τ-quantile of the<br />
distribution of Y <strong>and</strong> the ω-<strong>expectile</strong> that coincides with that quantile.<br />
The equation is for ES in the lower tail of the distribution. The equation<br />
for the upper tail of the distribution is produced by replacing ω <strong>and</strong> τ<br />
with (1 − ω) <strong>and</strong> (1 − τ), respectively.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 42/101/
Expectile <strong>regression</strong><br />
Expected shortfall† IV<br />
Value at Risk<br />
Another popular measure of financial risk is the Value at Risk (VaR). The<br />
VaR (ν p , say) specifies a level of excessive losses such that the probability<br />
of a loss larger than ν p is less than p (often p = 0.01 or 0.05 is chosen).<br />
The ES is defined as the conditional expectation of the loss given that it<br />
exceeds the VaR.<br />
ES “better” than VaR:<br />
ES has but VaR lacks the sub-additivity 3 property. So the ES is an<br />
increasingly popular risk measure in financial risk management.<br />
VaR is not a coherent risk measure.<br />
VaR provides no information on the extent of excessive losses other<br />
than specifying a level that defines the excessive losses.<br />
2 Dictionary: (i). A failure to attain a specified amount or level; a shortage.<br />
(ii). The amount by which a supply falls short of expectation, need, or dem<strong>and</strong>.<br />
3 The sub-additivity of a risk measure means that the risk for the sum of two<br />
independent risky events is not greater than the sum of the risks of the two events.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 43/101/
Asymmetric MLE<br />
Asymmetric MLE I<br />
Asymmetric maximum likelihood estimation allows for <strong>expectile</strong> <strong>regression</strong><br />
based on, essentially, any distribution. Efron (1991) developed this for the<br />
exponential family.<br />
Consider the linear model<br />
Let<br />
y i = x T i β + ε i , for i = 1, . . . , n.<br />
r i (β) = y i − x T i β<br />
be a residual. The asymmetric squared error loss S w (β) is<br />
S w (β) =<br />
n∑<br />
Qw(r ∗ i (β)) (14)<br />
i=1<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 44/101/
Asymmetric MLE<br />
Asymmetric MLE II<br />
<strong>and</strong> Q ∗ w is the asymmetric squared error loss function<br />
Q ∗ w(r) =<br />
{ r 2 , r ≤ 0,<br />
w r 2 , r > 0.<br />
(15)<br />
Here w is a positive constant <strong>and</strong> is related to ω by<br />
w =<br />
ω<br />
1 − ω . (16)<br />
For normally distributed responses, asymmetric least squares (ALS)<br />
estimation is a variant of OLS estimation.<br />
Estimation is by the Newton-Raphson algorithm. Order-2<br />
convergence is fast <strong>and</strong>, here, reliable. See later for details.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 45/101/
Asymmetric MLE<br />
Asymmetric MLE III<br />
Notation<br />
t Notation<br />
Comments<br />
Y<br />
Response. Has mean µ, cdf F (y), pdf f (y)<br />
Q Y (τ) = τ-quantile of Y 0 < τ < 1<br />
ξ(τ) = ξ τ = τ-quantile Koenker <strong>and</strong> Bassett (1978), ξ( 1 ) = median<br />
2<br />
µ(ω) = µ ω = ω-<strong>expectile</strong> 0 < ω < 1, µ( 1 ) = µ, Newey <strong>and</strong> Powell (1987)<br />
2<br />
bξ(τ), bµ(ω)<br />
Sample quantiles <strong>and</strong> <strong>expectile</strong>s<br />
centile<br />
Same as quantile <strong>and</strong> percentile here<br />
<strong>regression</strong> quantile Koenker <strong>and</strong> Bassett (1978)<br />
<strong>regression</strong> <strong>expectile</strong> Newey <strong>and</strong> Powell (1987)<br />
<strong>regression</strong> percentile All forms of asymmetric fitting, Efron (1992)<br />
ρ τ (u) = u · (τ − I (u < 0)) Check function corresponding to ξ(τ)<br />
ρ [2]<br />
ω (u) = u 2 · |ω − I (u < 0)| Check function corresponding to µ(ω)<br />
u + = max(u, 0)<br />
Positive part of u<br />
u − = min(u, 0)<br />
Negative part of u<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 46/101/
Asymmetric MLE<br />
ALS notes I<br />
Here are some notes about ALS quantile <strong>regression</strong>.<br />
Usually the user will specify some desired value of the percentile, e.g.,<br />
75 or 95. Then the necessary value of w needs to be numerically<br />
solved for to obtain this. One useful property is that the percentile is<br />
a monotonic function of w, meaning one can solve for the root of a<br />
nonlinear equation.<br />
A rough relationship between w <strong>and</strong> the percentile 100α is available.<br />
Let w (α) denote the value of w such that β w equals z (α) = Φ −1 (α),<br />
the 100α st<strong>and</strong>ard normal percentile point. If there are no covariates<br />
(intercept-only model) <strong>and</strong> y i are st<strong>and</strong>ard normal then<br />
w (α) = 1 +<br />
z (α)<br />
φ ( z (α)) − (1 − α)z (α) (17)<br />
where φ(z) is the probability density function of a st<strong>and</strong>ard normal.<br />
Here are some values.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 47/101/
Asymmetric MLE<br />
ALS notes II<br />
> alpha = c(1/2, 2/3, 3/4, 0.84, 9/10, 19/20)<br />
> zalpha = qnorm(p = alpha)<br />
> walpha = 1 + zalpha/(dnorm(zalpha) - (1 - alpha)*zalpha)<br />
> round(cbind(alpha, walpha), dig = 2)<br />
alpha walpha<br />
[1,] 0.50 1.00<br />
[2,] 0.67 2.96<br />
[3,] 0.75 5.52<br />
[4,] 0.84 12.81<br />
[5,] 0.90 28.07<br />
[6,] 0.95 79.73<br />
An important invariance property: if the y i are multiplied by some<br />
constant c then the solution vector ̂β w is also multipled by c. Also, a<br />
shift in location to y i + d means the estimated intercept (the first<br />
element in x) increases by d too.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 48/101/
Asymmetric MLE<br />
ALS notes III<br />
ALS quantile <strong>regression</strong> is consistent for the true <strong>regression</strong><br />
percentiles y (α) |x in the cases where y (α) |x is linear in x. A more<br />
general proof of this is available (Newey <strong>and</strong> Powell, 1987).<br />
In view of the one-to-one mapping between <strong>expectile</strong>s <strong>and</strong> quantiles<br />
Efron (1991) proposes that the τ-quantile be estimated by the<br />
<strong>expectile</strong> for which the proportion of in-sample observations lying<br />
below the <strong>expectile</strong> is τ. This provides justification for practitioners<br />
who use <strong>expectile</strong> <strong>regression</strong> to perform quantile <strong>regression</strong>.<br />
Some <strong>expectile</strong> references: Aigner et al. (1976), Newey <strong>and</strong><br />
Powell (1987), Efron (1991), Efron (1992), Jones (1994).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 49/101/
Asymmetric MLE<br />
Example I<br />
> ooo bmi.nz fit # Expectile plot<br />
> plot(BMI ~ age, <strong>data</strong> = bmi.nz, col = "blue", las = 1,<br />
main = paste(paste(round(fit@extra$percentile, dig = 1),<br />
collapse = ", "),<br />
"<strong>expectile</strong> curves"))<br />
> with(bmi.nz, matlines(age, fitted(fit), col = 1:npred(fit),<br />
lwd = 2, lty = 1))<br />
gives<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 50/101/
Asymmetric MLE<br />
Example II<br />
60<br />
●<br />
20.1, 56.3, 85.9 <strong>expectile</strong> curves<br />
●<br />
50<br />
BMI<br />
40<br />
30<br />
20<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
●<br />
● ● ●<br />
●●<br />
● ●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ●<br />
● ●<br />
● ●<br />
●<br />
● ● ● ● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
● ● ● ●<br />
●<br />
●●<br />
● ●●<br />
●●<br />
●<br />
● ●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ●●<br />
●<br />
● ●<br />
● ●● ● ● ● ●<br />
● ●<br />
●<br />
●● ●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
● ● ● ●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ● ● ●<br />
● ● ● ●<br />
●<br />
● ●<br />
●<br />
● ● ● ●<br />
● ● ●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●<br />
● ● ●<br />
● ● ●<br />
● ● ●<br />
●<br />
●<br />
●<br />
●<br />
● ●●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●●●<br />
● ●●<br />
●<br />
●<br />
●● ●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●● ● ● ● ● ●●<br />
● ●<br />
● ● ●<br />
● ●<br />
● ●●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●<br />
● ● ●<br />
●<br />
●<br />
●● ● ● ● ●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
● ● ● ●●<br />
● ●<br />
● ●<br />
● ●●● ● ●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
● ● ● ●<br />
●<br />
● ●<br />
● ●<br />
●<br />
●<br />
●<br />
● ● ●<br />
● ● ●●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
● ● ● ● ● ●<br />
●<br />
●●<br />
●<br />
● ● ● ●<br />
●<br />
●<br />
●<br />
●<br />
20 30 40 50 60 70 80<br />
age<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 51/101/ 101
Asymmetric MLE<br />
More on AML <strong>regression</strong>†<br />
Efron (1992) generalized ALS estimation to families in the exponential<br />
family, <strong>and</strong> in particular, the Poisson distribution. He called this<br />
asymmetric maximum likelihood (AML) estimation.<br />
More generally,<br />
S w (β) =<br />
is minimized (cf. (14)), where<br />
n∑<br />
i=1<br />
w i D w (y i , µ i (β)) (18)<br />
D w (µ, µ ′ ) =<br />
{ D(µ, µ ′ ) if µ ≤ µ ′ ,<br />
w D(µ, µ ′ ) if µ > µ ′ .<br />
(19)<br />
Here, D is the deviance from a model in the exponential family<br />
g η (y) =<br />
exp(ηy − ψ(η)).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 52/101/
Asymmetric MLE<br />
Estimation†<br />
An iterative solution is required, <strong>and</strong> the Newton-Raphson algorithm is<br />
used. In particular, for Poisson <strong>regression</strong> with the canonical (log) link,<br />
following in from Equation (2.16) of Efron (1992),<br />
β (a+1) = b (a) + db (a)<br />
= b − ¨S −1¨S<br />
w w<br />
= (X T (WV)X) −1 X T (WV)<br />
[<br />
]<br />
η + (WV) −1 Wr<br />
(20)<br />
are the Newton-Raphson iterations (iteration number a suppressed for<br />
clarity). Here, r = y − µ(b),<br />
V = diag(v 1 (b), . . . , v n (b)) = diag(µ 1 , . . . , µ n ) contains the variances<br />
of y i <strong>and</strong> W = diag(w 1 (b), . . . , w n (b)) with w i (b) = 1 if r i (b) ≤ 0 else w.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 53/101/
Asymmetric MLE<br />
AML Poisson example I<br />
> set.seed(1234)<br />
> mydat = <strong>data</strong>.frame(x2 = sort(runif(nn mydat = transform(mydat, y = rpois(nn, exp(0 - sin(8 * x2))))<br />
> fit = vgam(y ~ s(x2, df = 3),<br />
amlpoisson(w.aml = c(0.02, 0.2, 1, 5, 50)),<br />
<strong>data</strong> = mydat)<br />
> fit@extra<br />
$w.aml<br />
[1] 0.02 0.20 1.00 5.00 50.00<br />
$M<br />
[1] 5<br />
$n<br />
[1] 200<br />
$y.names<br />
[1] "w.aml = 0.02" "w.aml = 0.2" "w.aml = 1"<br />
[4] "w.aml = 5" "w.aml = 50"<br />
$individual<br />
[1] TRUE<br />
$percentile<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 54/101/
Asymmetric MLE<br />
AML Poisson example II<br />
w.aml = 0.02 w.aml = 0.2 w.aml = 1 w.aml = 5<br />
41.5 48.0 62.0 77.5<br />
w.aml = 50<br />
94.0<br />
$deviance<br />
w.aml = 0.02 w.aml = 0.2 w.aml = 1 w.aml = 5<br />
23.26 99.95 219.45 391.95<br />
w.aml = 50<br />
666.66<br />
Then<br />
> plot(jitter(y) ~ x2, <strong>data</strong> = mydat,<br />
col = "blue", las = 1, main =<br />
paste(paste(round(fit@extra$percentile, dig = 1),<br />
collapse = ", "),<br />
"Poisson-AML curves"))<br />
> with(mydat, matlines(x2, fitted(fit), lwd = 2))<br />
gives<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 55/101/
Asymmetric MLE<br />
AML Poisson example III<br />
41.5, 48, 62, 77.5, 94 Poisson−AML curves<br />
6<br />
●<br />
●<br />
●<br />
●<br />
jitter(y)<br />
5<br />
4<br />
3<br />
2<br />
1<br />
0<br />
●<br />
● ●●<br />
●<br />
●<br />
●<br />
● ● ● ●●<br />
●<br />
●<br />
● ●<br />
● ● ●<br />
●<br />
●<br />
● ●<br />
● ● ●<br />
● ●<br />
●<br />
●<br />
● ● ●<br />
● ●<br />
●<br />
● ● ●<br />
● ● ●● ●<br />
● ●●●<br />
●● ● ●<br />
●● ●<br />
● ● ●<br />
●<br />
● ●<br />
●<br />
●●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
● ● ●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●●●<br />
●● ● ●●<br />
●<br />
● ● ●● ●<br />
● ● ●<br />
● ●●<br />
0.0 0.2 0.4 0.6 0.8 1.0<br />
x2<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 56/101/
Asymmetric Laplace distribution<br />
Asymmetric Laplace distribution<br />
Distribution properties<br />
The asymmetric Laplace distribution (ALD) has a density<br />
f (y; ξ, b, τ) =<br />
=<br />
for −∞ < y < ∞, −∞ < ξ < ∞.<br />
τ(1 − τ)<br />
e −ρτ (y−ξ) (21)<br />
b<br />
{ (<br />
τ(1 − τ) exp −<br />
τ<br />
b |y − ξ|) , y ≤ ξ,<br />
b exp ( − 1−τ<br />
b |y − ξ|) (22)<br />
, y > ξ,<br />
Here, ξ is the location parameter <strong>and</strong> b is the positive scale parameter .<br />
The expected information matrix (EIM) is<br />
⎛<br />
⎞<br />
⎜<br />
⎝<br />
2<br />
− √ 8<br />
0<br />
σ 2 σ (1+κ 2 )<br />
1 −(1−κ<br />
0 2 )<br />
σ 2 σκ(1+κ 2 )<br />
− √ 8<br />
σ (1+κ 2 )<br />
−(1−κ 2 )<br />
σκ(1+κ 2 )<br />
1<br />
+ 4<br />
κ 2 (1+κ 2 ) 2<br />
⎟<br />
⎠ . (23)<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 57/101/
Asymmetric Laplace distribution<br />
VGLMs <strong>and</strong> ALD<br />
Suppose τ = (τ 1 , τ 2 , . . . , τ L ) T are either the L values of τ of interest to<br />
the practitioner or the L reference values of τ. Let ξ s be the corresponding<br />
τ s th quantile, s = 1, . . . , L. VGLMs use<br />
g 1 (ξ s (x)) = η s = β T s x, s = 1, . . . , L, (24)<br />
where g 1 is a specified parameter link function.<br />
Hence the classical approach has g 1 being the identity link:<br />
ξ s = β T s x.<br />
The central formula for us is therefore<br />
min<br />
β<br />
E[ ρ τ (Y − g −1<br />
1 (βT x))]. (25)<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 58/101/
Asymmetric Laplace distribution<br />
Two noncrossing solutions I<br />
The VGLM/VGAM framework offers two solutions.<br />
1 Use parallelism.<br />
When a parallelism assumption is made, one must choose some<br />
reference values of τ to estimate the <strong>regression</strong> coefficients of the<br />
model, viz.<br />
g 1 (ξ s (x)) = η s = β (s)1 + β T (−1) x (−1) (26)<br />
where x (−1) is x without its first element. Here the hyperplanes differ<br />
by a constant amount at a given value of x on the transformed scale.<br />
The constraint matrices are H k = 1 M for k = 2, . . . , M.<br />
The idea is the same as the proportional odds model.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 59/101/
Asymmetric Laplace distribution<br />
Two noncrossing solutions II<br />
2 The accumulative quantile <strong>regression</strong> (AQR) method.<br />
Given a vector τ with sorted values, say, the basic idea of AQR is to<br />
fit ξ τ1 (x) by the ALD (using some link function if necessary), then<br />
computing the residuals <strong>and</strong> fitting ξ τ2 (x) to the residuals using a log<br />
link. This can be continued until the last value of τ . A log link<br />
ensures that each successive quantile is greater than the previous<br />
quantile over all values of x so that they do not cross. The method<br />
gets its name because the solutions are accumulated sequentially.<br />
Informal name: the onion method.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 60/101/
Asymmetric Laplace distribution<br />
Example 1 I<br />
set.seed(123)<br />
alldat
Asymmetric Laplace distribution<br />
Example 1 II<br />
This gives<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
0.2 0.4 0.6 0.8 1.0 1.2<br />
0<br />
5<br />
10<br />
15<br />
y<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 62/101<br />
18 July 2012 @ Cagliari 62 / 101
Asymmetric Laplace distribution<br />
Example 2 I<br />
Here is another example, applied to binomial proportions.<br />
A r<strong>and</strong>om sample of n = 200 observations were generated<br />
from X i ∼ Unif(0, 1) <strong>and</strong><br />
Y i ∼ Binomial ( N i = 10, µ(x i ) = logit −1 {−3 + 8x i } ) /N i . (27)<br />
Let τ = ( 1 4 , 1 2 )T .<br />
myprob
Asymmetric Laplace distribution<br />
Example 2 II<br />
1.0<br />
o o<br />
o o<br />
o o ooo<br />
o<br />
ooo<br />
oo<br />
oo o oooo o oo o o<br />
o o<br />
oo<br />
o<br />
o o<br />
o<br />
o<br />
o<br />
o o o<br />
o ooo<br />
oo<br />
0.8<br />
o<br />
o oo<br />
o<br />
o o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
o<br />
0.6<br />
o<br />
o o o<br />
o<br />
y<br />
o<br />
oo<br />
o<br />
o<br />
o<br />
o<br />
0.4<br />
o<br />
o o<br />
o o<br />
oo<br />
o<br />
oo<br />
o<br />
o ooo<br />
o o<br />
o o<br />
0.2<br />
o o<br />
o<br />
o o o<br />
o oo o o<br />
oo<br />
o o oooo<br />
oo<br />
o o<br />
o<br />
o o oo<br />
0.0<br />
oo<br />
o<br />
o<br />
oo o<br />
o<br />
o<br />
0.0 0.2 0.4 0.6 0.8 1.0<br />
x<br />
Nb. the green curve is Koenker’s estimate.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 64/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
Extreme value <strong>data</strong> <strong>analysis</strong> I<br />
A motivating example. . .<br />
Table: Subset of the Venice sea levels <strong>data</strong>. For each year from 1931 to 1981 the<br />
10 highest daily sea levels (cm) are recorded.<br />
t 1931 103 99 98 96 94 89 86 85 84 79<br />
1932 78 78 74 73 73 72 71 70 70 69<br />
1933 121 113 106 105 102 89 89 88 86 85<br />
1934 116 113 91 91 91 89 88 88 86 81<br />
1935 115 107 105 101 93 91<br />
1936 147 106 93 90 87 87 87 84 82 81<br />
1937 119 107 107 106 105 102 98 95 94 94<br />
.<br />
.<br />
1979 166 140 131 130 122 118 116 115 115 112<br />
1980 134 114 111 109 107 106 104 103 102 99<br />
1981 138 136 130 128 119 110 107 104 104 104<br />
.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 65/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 66/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 67/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
Models for Extreme Value Data<br />
Data: (y i , x i ), i = 1, . . . , n, where<br />
y i<br />
∼ F<br />
for some continuous distribution function F . Extreme value theory is the<br />
branch of statistics concerned with inferences on the tail of F . This<br />
distinguishes it from almost every other area of statistics.<br />
Many applications, e.g.,<br />
environmental science (sea-levels, wind speeds, floods),<br />
reliability modelling (weakest-link-type models),<br />
finance (e.g., insurance company at risk of bankrupcy from large<br />
claims),<br />
sport science (e.g., fastest running times for 100 m).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 68/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
Classical Theory<br />
Let M n = max(Y 1 , . . . , Y n ) where Y i are i.i.d. from a continuous cdf F .<br />
Suppose we can find normalizing constants a n > 0 <strong>and</strong> b n such that<br />
( )<br />
Mn − b n<br />
P<br />
≤ y −→ G(y) (28)<br />
a n<br />
as n → ∞, where G is some proper cdf.<br />
Then G is necessarily one of three possible types of (parametric) limiting<br />
distribution functions [aka <strong>extreme</strong> value trinity theorem]:<br />
Weibull type,<br />
Gumbel type (aka the Type I distribution, this accommodates the<br />
normal, lognormal, logistic, gamma, exponential <strong>and</strong> Weibull), <strong>and</strong><br />
Fréchet type.<br />
These types are special cases of the GEV distribution.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 69/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GEV I<br />
The generalized <strong>extreme</strong> value (GEV) distribution has cdf<br />
{ [ ( )] }<br />
y − µ<br />
−1/ξ<br />
G(y; µ, σ, ξ) = exp − 1 + ξ<br />
, (29)<br />
σ<br />
with σ > 0, −∞ < µ < ∞, 1 + ξ(y − µ)/σ > 0, where x + = max(x, 0).<br />
The µ, σ <strong>and</strong> ξ are known as the location, scale <strong>and</strong> shape parameters<br />
respectively.<br />
The 3 cases are:<br />
ξ < 0: Weibull type,<br />
ξ = 0: Gumbel type,<br />
ξ > 0: Fréchet type.<br />
For parametric models, VGAM provides maximum likelihood estimates<br />
(MLEs).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 70/101/ +
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GEV II<br />
Smith (1985) established that for:<br />
ξ < −1: MLEs do not exist,<br />
−1 < ξ < −0.5: MLEs exist but are non-regular,<br />
ξ > −0.5: MLEs are completely regular.<br />
In most environmental problems ξ > −1 so MLE works fine. And lots of<br />
<strong>data</strong> are needed to model ξ accurately.<br />
In terms of quantiles,<br />
y p<br />
= µ − σ ξ<br />
[<br />
1 − {− log(1 − p)} −ξ] ,<br />
where G(y p ) = 1 − p. In <strong>extreme</strong> value terminology, y p is the return level<br />
associated with the return period 1/p, e.g., the (return) level expected to<br />
exceed on average, once every (return period) interval of time.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 71/101/ 101
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GEV III<br />
1.0<br />
ξ = −0.25<br />
1.0<br />
ξ = 0<br />
0.8<br />
0.8<br />
0.6<br />
0.6<br />
0.4<br />
0.4<br />
0.2<br />
0.2<br />
0.0<br />
0.0<br />
−2 −1 0 1 2 3<br />
−2 −1 0 1 2 3<br />
1.0<br />
0.8<br />
ξ = 0.25<br />
0.3<br />
ξ = − 0.25<br />
ξ = 0<br />
ξ = 0.25<br />
0.6<br />
0.2<br />
0.4<br />
0.2<br />
0.1<br />
0.0<br />
0.0<br />
−2 −1 0 1 2 3<br />
−2 −1 0 1 2 3<br />
Figure: GEV densities for values µ = 0, σ = 1, <strong>and</strong> ξ = − 1 4 , 0, 1 4 (Weibull-,<br />
Gumbel- <strong>and</strong> Fréchet-types respectively). The orange curve is the cdf, the dashed<br />
1<br />
purple segments divide the density into areas of<br />
10<br />
. The bottom RHS plot has<br />
the densities overlaid.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 72/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GEV IV<br />
t<br />
Distribution CDF F (y; θ) Support VGAM family<br />
( » „ «– )<br />
y − µ −1/ξ<br />
Generalized <strong>extreme</strong> value exp − 1 + ξ<br />
(µ − σ/ξ, ∞) [dpqr][e]gev()<br />
σ +<br />
» „ «– y − µ −1/ξ<br />
Generalized Pareto<br />
1 − 1 + ξ<br />
(µ, ∞) if ξ > 0,<br />
σ +<br />
(µ, µ − σ/ξ) if ξ < 0 [dpqr]gpd()<br />
j » „ «–ff<br />
y − µ<br />
Gumbel<br />
exp − exp −<br />
IR<br />
[dpqr][e]gumbel()<br />
σ<br />
Table: Some <strong>extreme</strong> value distributions currently supported by VGAM. Plotting<br />
functions include guplot(), meplot(), qtplot(), rlplot().<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 73/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GEV V<br />
Gumbel distribution<br />
From the Table on Slide 73, the Gumbel cdf is<br />
{ [ ( )]} y − µ<br />
G(y) = exp − exp −<br />
, − ∞ < y < ∞. (30)<br />
σ<br />
So to check if Y is Gumbel then plotting the sorted values y i versus the<br />
reduced values r i<br />
r i = − log(− log(p i ))<br />
should be linear. Here, p i is the ith plotting position, taken to<br />
be (i − 1 2<br />
)/n, say. Curvature upwards/downwards may indicate a<br />
Fréchet/Weibull distribution, respectively. Outliers may also be detected.<br />
See guplot() in VGAM.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 74/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD I<br />
The generalized Pareto distribution (GPD) is the second of the two most<br />
important distributions in <strong>extreme</strong>s <strong>data</strong> <strong>analysis</strong>.<br />
Giving rise to what is known as the threshold method, this is a common<br />
alternative approach based on exceedances over high thresholds.<br />
The idea is to pick a high threshold value u <strong>and</strong> to study all the<br />
exceedances of u, i.e., values of Y greater than u. In <strong>extreme</strong> value<br />
terminology, Y − u are the excesses. For deficits below a low threshold,<br />
these may be converted to the upper tail by M n = − min(−Y 1 , . . . , −Y n ).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 75/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD II<br />
The GPD was proposed by Pick<strong>and</strong>s (1975) <strong>and</strong> has cdf<br />
[<br />
G(y; µ, σ, ξ) = 1 − 1 + ξ<br />
( y − µ<br />
σ<br />
)] −1/ξ<br />
+<br />
(y − µ)<br />
, for 1 + ξ > 0 (31)<br />
σ<br />
<strong>and</strong> σ > 0. The µ, σ <strong>and</strong> ξ are the location, scale <strong>and</strong> shape parameters<br />
respectively.<br />
As with the GEV, there is a “three types theorem” to the effect that the<br />
following three cases can be considered, depending on ξ in (31).<br />
Beta-type (ξ < 0): G(y) has support on µ < y < µ − σ/ξ. It has a<br />
short tail <strong>and</strong> a finite upper endpoint.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 76/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD III<br />
Exponential-type (ξ = 0): G(y) = 1 − exp{−(y − µ)/σ}. The<br />
limit ξ → 0 in the survivor function 1 − G gives the shifted<br />
exponential with mean µ + σ as a special case, This is a thin (some<br />
say medium) tailed distribution with the “memoryless”<br />
property P(Y > a + b|Y > a) = P(Y > b) for all a ≥ 0, b ≥ 0.<br />
Pareto-type (ξ > 0): G(y) ∼ 1 − cy −1/ξ for some c > 0 <strong>and</strong> y > µ.<br />
The tail is heavy, <strong>and</strong> follows Pareto’s “power law.”<br />
Also, the GPD has<br />
E(Y ) = µ + σ if ξ < 1,<br />
1 − ξ<br />
σ 2<br />
Var(Y ) =<br />
(1 − 2ξ)(1 − ξ) 2 if ξ < 1 2 .<br />
The mean is returned as the fitted value if gpd(percentile = NULL).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 77/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD IV<br />
1.0<br />
1.0<br />
0.8<br />
0.8<br />
0.6<br />
ξ = −0.25<br />
0.6<br />
ξ = 0<br />
0.4<br />
0.4<br />
0.2<br />
0.2<br />
0.0<br />
0.0<br />
0 1 2 3<br />
0 1 2 3<br />
1.0<br />
1.0<br />
0.8<br />
0.8<br />
0.6<br />
0.4<br />
ξ = 0.25<br />
0.6<br />
0.4<br />
ξ = − 0.25<br />
ξ = 0<br />
ξ = 0.25<br />
0.2<br />
0.2<br />
0.0<br />
0.0<br />
0 1 2 3<br />
0 1 2 3<br />
Figure: GPD densities for values µ = 0, σ = 1, <strong>and</strong> ξ = − 1 4 , 0, 1 4 (beta-,<br />
exponential- <strong>and</strong> Pareto-types, respectively). The orange curve is the cdf, the<br />
1<br />
dashed purple segments divide the density into areas of<br />
10<br />
. The bottom RHS plot<br />
has the densities overlaid.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 78/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD V<br />
Figure: Two figures from<br />
http://www.isse.ucar.edu/<strong>extreme</strong>values/back.html.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 79/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD VI<br />
The GPD approach is considered superior to GEV modelling for several<br />
reasons.<br />
its <strong>data</strong> is made more efficient use of. Although the GEV can be<br />
adapted to model the top r values the GPD models any number of<br />
observations above a certain threshold, therefore is more general.<br />
GPD modelling allows x to be more efficiently used to explain y.<br />
This so-called peaks over thresholds (POT) approach also<br />
assumes Y 1 , Y 2 , . . . are an i.i.d. sequence from a marginal distribution F .<br />
Suppose Y has cdf F , <strong>and</strong> let Y ∗ = Y − u givenY > u. Then<br />
P(Y ∗ ≤ y ∗ ) = P(Y ≤ u + y ∗ |Y > u) = F (u + y ∗ ) − F (u)<br />
, y ∗ > 0.<br />
1 − F (u)<br />
If P(max(Y 1 , . . . , Y n ) ≤ y) ≈ G(y) for G in (29), <strong>and</strong> for sufficiently<br />
large u, then the distribution of Y − u|Y > u is approximately that of the<br />
GPD.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 80/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD VII<br />
Choosing a threshold<br />
In practice, this be a delicate matter. The bias-variance tradeoff means<br />
that if u is too high then the reduction in <strong>data</strong> means higher variance.<br />
Many applications of EVT do not have sufficient <strong>data</strong> anyway because<br />
<strong>extreme</strong>s are often rare events, therefore information loss is to be<br />
particularly avoided.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 81/101/ 101
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD VIII<br />
Mean excess plot<br />
It can be shown that if ξ < 1 then<br />
E(Y − u | 0 < u < Y ) = σ + ξ u<br />
1 − ξ . (32)<br />
This gives a simple diagnostic for threshold selection: the residual mean<br />
life (32) should be linear in u at levels for which the model is valid.<br />
Suggests producing an empirical plot of the residual life plot <strong>and</strong> looking<br />
for linearity. Plot the sample mean of excesses over u versus u. Look for<br />
linearity; slope is ξ/(1 − ξ). This is known as a mean life residual plot or a<br />
mean excess plot (meplot() in VGAM).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 82/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD IX<br />
The gpd() family accepts µ as known input <strong>and</strong> internally operates on the<br />
excesses y − µ. Note that the working weights W i in the IRLS algorithm<br />
are positive-definite only if ξ > − 1 2<br />
, <strong>and</strong> this is ensured with the default<br />
link g(ξ) = log(ξ + 1 2<br />
) for argument lshape.<br />
The fitted values of gpd() are percentiles obtained from (31):<br />
y p = µ + σ [ ]<br />
p −ξ − 1 , 0 < p < 1. (33)<br />
ξ<br />
If ξ = 0 then<br />
y p = µ − σ log(1 − p). (34)<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 83/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD X<br />
Regularity conditions<br />
In terms of regularity, the GPD is very similar to the GEV. Smith (1985)<br />
showed that for ξ > − 1 2<br />
the information matrix is finite <strong>and</strong> the classical<br />
asymptotic theory of MLEs is applicable, while for ξ ≤ − 1 2<br />
the problem is<br />
nonregular <strong>and</strong> special procedures are needed.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 84/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
GPD XI<br />
Independence<br />
Often threshold excesses are not independent, e.g., a hot day is likely to be<br />
followed by another hot day. There are various procedures to h<strong>and</strong>le<br />
dependence, e.g., model the dependence, de-clustering, <strong>and</strong> resampling to<br />
estimate st<strong>and</strong>ard errors.<br />
When the <strong>data</strong> do not come from an i.i.d. distribution we say the resulting<br />
model is non-stationary. There is no general theory for h<strong>and</strong>ling this.<br />
Furthermore, quantities such as return periods do not make sense anymore<br />
because the distribution is changing, e.g., over time. In application areas<br />
such as climatology there is a consensus in the scientific community that<br />
climate should no longer be regarded as stationary.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 85/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
The r-Largest Order Statistics<br />
Data: (x i , y i ) T , i = 1, . . . , n, where y i = (y i1 , . . . , y iri ) T ,<br />
y i1 ≥ y i2 ≥ · · · ≥ y iri . That is, the most <strong>extreme</strong> r i values (at a fixed value<br />
of x i ). We call this block <strong>data</strong>. Given x i , the <strong>data</strong> (not just the <strong>extreme</strong>s)<br />
are assumed to be i.i.d. realizations from F .<br />
Examples<br />
1 Venice sea levels <strong>data</strong>: x = 1931 to 1981, r i = 10 except for one i.<br />
2 The top 10 runners in each age group in a school are used to estimate<br />
the 99 percentile of running speed as a function of age.<br />
3 The 10 most intelligent children in each age group in a large school<br />
are tested with the same IQ test. Fixing the definition of “gifted” as<br />
being within the top 1%, the <strong>data</strong> helps determine the cut-off score<br />
for that particular IQ test for each age group in order to screen for<br />
gifted children.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 86/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
The Block-Gumbel Model I<br />
Suppose the maxima is Gumbel (GEV with ξ = 0) <strong>and</strong> let Y (1) , . . . , Y (r) be<br />
the r largest observations, such that Y (1) ≥ · · · ≥ Y (r) . Given that ξ = 0,<br />
the joint distribution of<br />
(<br />
Y(1) − b n<br />
a n<br />
, . . . , Y )<br />
(r) − b T n<br />
a n<br />
has, for large n, a limiting distribution, having density<br />
⎧<br />
⎨ (<br />
f (y (1) , . . . , y (r) ; µ, σ) = σ −r exp<br />
⎩ − exp − y )<br />
(r) − µ<br />
r∑<br />
( ) ⎫<br />
y(j) − µ ⎬<br />
−<br />
σ<br />
σ ⎭ ,<br />
for y (1) ≥ · · · ≥ y (r) . Can treat this as an approximate likelihood.<br />
j=1<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 87/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
The Block-Gumbel Model II<br />
Smith (1986) derived quantiles allowing µ to be linear in x. Rosen <strong>and</strong><br />
Cohen (1996) extended this to allow for smoothing splines—the VGAM<br />
framework!<br />
The VGAM family function gumbel() uses η(x) = (µ(x), log σ(x)) T by<br />
default, <strong>and</strong> that the likelihood used is only an approximate likelihood.<br />
Extreme quantiles for the block-Gumbel model can be calculated as<br />
follows. If the y i1 , . . . , y iri are the r i largest observations from a population<br />
of size R i at x i then a large α = 100(1 − c i /R i )% percentile of F can be<br />
estimated by<br />
ˆµ i − ˆσ i log c i . (35)<br />
For example, for the Venice <strong>data</strong>, R i = 365 (if all the <strong>data</strong> were collected<br />
there would be one observation per day of the year resulting in 365<br />
observations) <strong>and</strong> so a 99 percentile is obtained from ˆµ i − ˆσ i log(3.65).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 88/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
The Block-Gumbel Model III<br />
The median predicted value (MPV) for a particular year is the value for<br />
which the maximum of that year has an even chance of exceeding. It<br />
corresponds to c i = log(log(2)) ≈ −0.673 in (35).<br />
From a practical point of view, one weakness of the block-Gumbel model<br />
is that one often does not have sufficient <strong>data</strong> to verify the assumption<br />
that ξ = 0.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 89/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
> fit = vglm(cbind(r1, r2, r3, r4, r5) ~ year, <strong>data</strong> = venice,<br />
gumbel(R = 365, mpv = TRUE, zero = 2, lscale = "identity"))<br />
> coef(fit, matrix = TRUE)<br />
location scale<br />
(Intercept) -780.2947 12.76<br />
year 0.4583 0.00<br />
But a preliminary VGAM fitted to all the <strong>data</strong> is<br />
> ymatrix = as.matrix(venice[,paste("r", 1:10, sep = "")])<br />
> fit1 = vgam(ymatrix ~ s(year, df = 3), <strong>data</strong> = venice,<br />
gumbel(R = 365, mpv = TRUE), na.action = na.pass)<br />
> plot(fit1, se = TRUE, lcol = "blue", scol = "darkgreen",<br />
lty = 1, lwd = 2, slwd = 2, slty = "dashed")<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 90/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
20<br />
15<br />
0.2<br />
10<br />
s(year, df = 3):1<br />
5<br />
0<br />
−5<br />
s(year, df = 3):2<br />
0.1<br />
0.0<br />
−10<br />
−0.1<br />
−15<br />
1930 1940 1950 1960 1970 1980<br />
year<br />
1930 1940 1950 1960 1970 1980<br />
year<br />
It appears that the first function, µ, is linear <strong>and</strong> the second, σ, may be<br />
constant. Let’s fit such a model.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 91/101/ 101
Extreme value <strong>data</strong> <strong>analysis</strong><br />
> fit2 = vglm(ymatrix ~ year, gumbel(R = 365, mpv = TRUE, zero = 2),<br />
venice, na.action = na.pass)<br />
> head(fitted(fit2), 4)<br />
95% 99% MPV<br />
1 67.78 88.79 110.5<br />
2 68.26 89.27 111.0<br />
3 68.75 89.75 111.4<br />
4 69.23 90.24 111.9<br />
> qtplot(fit2, lcol = c(1, 2, 5), tcol = c(1, 2, 5),<br />
mpv = TRUE, lwd = 2, pcol = "blue", tadj = 0.1)<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 92/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
●<br />
180<br />
160<br />
140<br />
120<br />
100<br />
80<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ● ●<br />
●<br />
●<br />
● ● ●<br />
● ●<br />
●<br />
● ●<br />
● ●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
● ●<br />
● ●<br />
● ●<br />
● ●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
● ● ●<br />
●<br />
●<br />
●<br />
●<br />
● ● ●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
●<br />
● ●<br />
●<br />
●<br />
● ● ● ●<br />
● ●<br />
●<br />
● ● ● ●<br />
● ●<br />
● ●<br />
● ● ●<br />
●<br />
●<br />
● ●<br />
● ● ● ● ●<br />
●<br />
●<br />
● ● ●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
●<br />
● ● ● ● ●<br />
●<br />
●<br />
● ● ● ●<br />
● ●<br />
●<br />
● ● ●<br />
● ● ● ●<br />
●<br />
● ●<br />
●<br />
●<br />
● ● ●<br />
●<br />
●<br />
MPV<br />
99%<br />
95%<br />
1930 1940 1950 1960 1970 1980<br />
year<br />
Clearly, it appears that the response is increasing over time, <strong>and</strong> that a<br />
linear model appears to do well.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 93/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
> summary(fit2)<br />
Call:<br />
vglm(formula = ymatrix ~ year, family = gumbel(R = 365, mpv = TRUE,<br />
zero = 2), <strong>data</strong> = venice, na.action = na.pass)<br />
Pearson Residuals:<br />
Min 1Q Median 3Q Max<br />
location -2.1 -0.87 -0.30 0.75 3.0<br />
log(scale) -1.7 -1.02 -0.59 0.32 4.6<br />
Coefficients:<br />
Estimate Std. Error z value<br />
(Intercept):1 -826.62 77.396 -11<br />
(Intercept):2 2.57 0.042 61<br />
year 0.48 0.040 12<br />
Number of linear predictors: 2<br />
Names of linear predictors: location, log(scale)<br />
Dispersion Parameter for gumbel family: 1<br />
Log-likelihood: -1086 on 99 degrees of freedom<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 94/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
Number of iterations: 5<br />
All the linear coefficients are significant.<br />
The rest of the <strong>analysis</strong> follows Rosen <strong>and</strong> Cohen (1996) but allows for the<br />
missing values. We’ll use fit1. Following (35),<br />
> with(venice, matplot(year, ymatrix, ylab = "sea level (cm)", type = "n"))<br />
> with(venice, matpoints(year, ymatrix, pch = "*", col = "blue"))<br />
> with(venice, lines(year, fitted(fit1)[, "99%"], lwd = 2, col = "red"))<br />
produces the 99 percentiles of the distribution. That is, for any particular<br />
year, we should expect 99% × 365 ≈ 361 observations below the line, or<br />
equivalently, 4 observations above the line. It is seen that there is a<br />
general increase in <strong>extreme</strong> sea levels over time (or that Venice is sinking).<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 95/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
sea level (cm)<br />
180<br />
160<br />
140<br />
120<br />
100<br />
80<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
* *<br />
*<br />
*<br />
*<br />
* *<br />
*<br />
*<br />
* *<br />
*<br />
*<br />
*<br />
*<br />
* *<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
* * * * *<br />
* * * *<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
* * * * * * *<br />
* *<br />
*<br />
* *<br />
* *<br />
*<br />
*<br />
* *<br />
*<br />
* * * *<br />
* * *<br />
*<br />
* * *<br />
*<br />
* * * * * * *<br />
*<br />
*<br />
* *<br />
* * * *<br />
*<br />
* * *<br />
* * *<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
* * * * * *<br />
* * *<br />
* * *<br />
* * * *<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
*<br />
* * * * * * * * * * * * * *<br />
*<br />
* * * * * * * * * *<br />
*<br />
*<br />
* * * * *<br />
*<br />
* *<br />
*<br />
* *<br />
* *<br />
1930 1940 1950 1960 1970 1980<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 96/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
To check this,<br />
> with(venice, plot(year, ymatrix[, 4], ylab = "sea level", type = "n"))<br />
> with(venice, points(year, ymatrix[, 4], pch = "4", col = "blue"))<br />
> with(venice, lines(year, fitted(fit1)[, "99%"], lty = 1, col = "red"))<br />
> with(venice, lines(smooth.spline(year, ymatrix[, 4], df = 4),<br />
col = "darkgreen", lty = 3))<br />
130<br />
4<br />
4<br />
120<br />
sea level<br />
110<br />
100<br />
90<br />
4<br />
4<br />
4<br />
4<br />
4<br />
4<br />
4<br />
4<br />
4 4<br />
4<br />
4 4<br />
4<br />
4<br />
4<br />
4<br />
4 4<br />
4<br />
4<br />
4<br />
4<br />
4 4<br />
4 4 4<br />
4<br />
4<br />
4<br />
4<br />
4<br />
4<br />
4<br />
4 4<br />
4<br />
4<br />
4 4 4<br />
80<br />
4<br />
4<br />
4<br />
4<br />
4<br />
4<br />
4<br />
1930 1940 1950 1960 1970 1980<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 97/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
This plot compares a cubic spline fitted to the fourth order statistic<br />
(4/365 ≈ 1%) values with the fitted 99 percentile values of the<br />
block-Gumbel model. Although both have approximately the same amount<br />
of smoothing, the cubic spline is less wiggly. However, the overall results<br />
are very similar.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 98/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
Finally, the following figure plots the median predicted value. It was<br />
produced by<br />
> with(venice, plot(year, ymatrix[, 1], ylab = "sea level", type = "n"))<br />
> with(venice, points(year, ymatrix[, 1], pch = "1", col = "blue"))<br />
> with(venice, lines(year, fitted(fit1)[, "MPV"], lty = 1, col = "red"))<br />
> with(venice, lines(smooth.spline(year, ymatrix[, 1], df = fit1@nl.df[1]+2<br />
col = "darkgreen", lty = 3))<br />
sea level<br />
180<br />
160<br />
140<br />
120<br />
100<br />
1<br />
1<br />
1 1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1<br />
1 1<br />
1<br />
1 1 1<br />
1<br />
1<br />
1 1 1<br />
1<br />
1<br />
1 1<br />
1 1 1 1 1 1<br />
1 1 1 1<br />
1 1 1<br />
1 1<br />
1 1<br />
1 1 1<br />
1<br />
1<br />
1<br />
1<br />
80<br />
1<br />
1930 1940 1950 1960 1970 1980<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 99/101/
Extreme value <strong>data</strong> <strong>analysis</strong><br />
The MPV for a particular year is the value for which the maximum of that<br />
year has an even chance of exceeding. It is evident from this plot too that<br />
the sea level is increasing over time.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 100 100/101 / 101
Concluding remarks<br />
Concluding remarks<br />
1 The VGLM/VGAM/RR-VGLM framework naturally accomodates a<br />
rich class of methods for quantile <strong>and</strong> <strong>expectile</strong> <strong>regression</strong>.<br />
2 The framework also accomodates the two most important <strong>extreme</strong><br />
distributions.<br />
3 Both areas need more development in terms of theory <strong>and</strong> software.<br />
© T. W. Yee (University of Auckl<strong>and</strong>) <strong>Quantile</strong>/<strong>expectile</strong> <strong>regression</strong>, <strong>and</strong> <strong>extreme</strong> <strong>data</strong> <strong>analysis</strong> 18 July 2012 @ Cagliari 101 101/101 /