{"word_count": 195, "character_count": 1708}
An alternative (to profile likelihood techniques) to derive confidence intervals is to use the delta method. Consider an estimator such thatthen for any differentiable transformationThe proof of that result is based on Taylor's expansion (see here or there for more details on the theory, or even on this blog - here, in French or there in English - for some codes in R). This can be used to derive an asymptotic confidence interval for a quantile. Consider the following dataset&#62; base1=read.table(+ "http://freakonometrics.free.fr/danish-univariate.txt",+ header=TRUE)&#62; library(evir)&#62; X=base1$Loss.in.DKMIt is possible to fit a Generalized Pareto distribution on observations above a given threshold,In that case, if  exceed the threshold out of a sample of size , the estimator of the quantilei.e. . Thenwhilei.e. it is now possible to implement the delta-method to derive the asymptotic variance of the quantile, and also (asymptotic) confidence intervals.&#62; u=5&#62; GPD=gpd(X,u)&#62; theta=GPD$par.ests&#62; sigma=GPD$varcov&#62; k=GPD$n.exceed&#62; n=length(X)&#62; p=.975&#62; Q=u+theta[2]/theta[1]*((n*(1-p)/k)^(-theta[1])-1)&#62; nabla=c(-theta[2]/theta[1]^2*((1-p)^(-theta[1])-1)-+ theta[2]/theta[1]*(1-p)^(-theta[1]*log(1-p)),+ 1/theta[1]*((1-p)^(-theta[1])-1))&#62; variance=t(nabla)%*%sigma%*%nablaBased on the assumption of normality, it is possible to derive confidence intervals, and to compare them with the one obtained in R,&#62; c(Q-1.96/sqrt(k)*sqrt(variance),+   Q+1.96/sqrt(k)*sqrt(variance))[1] 13.11562 16.82852+ tailplot(gpd(X,5))+ gpd.q(tailplot(gpd(X,5)), .975, ci.type =+ "likelihood", ci.p = 0.95,like.num = 50)Lower CI Estimate Upper CI13.33329 14.97207 17.18094