{"word_count": 295, "character_count": 2651}
Since several students got the intuition that natural catastrophes might be non-insurable (underlying distributions with infinite mean), I will post some comments on testing procedures for extreme value models.A natural idea is to use a likelihood ratio test (for composite hypotheses). Let  denote the parameter (of our parametric model, e.g. the tail index), and we would like to know whether  is smaller or larger than  (where in the context of finite versus infinite mean ). I.e. either  belongs to the set  or to its complementary . Consider the maximum likelihood estimator , i.e.Let  and  denote the constrained maximum likelihood estimators on  and  respectively,Either  and  (on the left), or  and  (on the right)So likelihood ratios       are either equal to      or        If we use the code mentioned in the post on profile likelihood, it is easy to derive that ratio. The following graph is the evolution of that ratio, based on a GPD assumption, for different thresholds,&#62; base1=read.table(+ "http://freakonometrics.free.fr/danish-univariate.txt",+ header=TRUE)&#62; library(evir)&#62; X=base1$Loss.in.DKM&#62; U=seq(2,10,by=.2)&#62; LR=P=ES=SES=rep(NA,length(U))&#62; for(j in 1:length(U)){+ u=U[j]+ Y=X[X&#62;u]-u+ loglikelihood=function(xi,beta){+ sum(log(dgpd(Y,xi,mu=0,beta))) }+ XIV=(1:300)/100;L=rep(NA,300)+ for(i in 1:300){+ XI=XIV[i]+ profilelikelihood=function(beta){+ -loglikelihood(XI,beta) }+ L[i]=-optim(par=1,fn=profilelikelihood)$value }+ plot(XIV,L,type="l")+ PL=function(XI){+ profilelikelihood=function(beta){+ -loglikelihood(XI,beta) }+ return(optim(par=1,fn=profilelikelihood)$value)}+ (L0=(OPT=optimize(f=PL,interval=c(0,10)))$objective)+ profilelikelihood=function(beta){+ -loglikelihood(1,beta) }+ (L1=optim(par=1,fn=profilelikelihood)$value)+ LR[j]=L1-L0+ P[j]=1-pchisq(L1-L0,df=1)+ G=gpd(X,u)+ ES[j]=G$par.ests[1]+ SES[j]=G$par.ses[1]+ }&#62;&#62; plot(U,LR,type="b",ylim=range(c(0,LR)))&#62; abline(h=qchisq(.95,1),lty=2)with on top the values of the ratio (the dotted line is the quantile of a chi-square distribution with one degree of freedom) and below the associated p-value&#62; plot(U,P,type="b",ylim=range(c(0,P)))&#62; abline(h=.05,lty=2)In order to compare, it is also possible to look at confidence interval for the tail index of the GPD fit,&#62; plot(U,ES,type="b",ylim=c(0,1))&#62; lines(U,ES+1.96*SES,type="h",col="red")&#62; abline(h=1,lty=2)To go further, see Falk (1995), Dietrich, de Haan &#38; Hüsler (2002), Hüsler &#38; Li (2006) with the following table, or Neves &#38; Fraga Alves (2008). See also here or there (for the latex based version) for an old paper I wrote on that topic.