如何处理此类问题?下面是测试数据:
require(extRemes)
require(evd)
# no weights
weights=1
fit=fevd(xb,type="GEV",method=c("MLE","GMLE")[2],verbose=TRUE,weights=1)
ksb=ks.test(fit$x,pgev,fit$results$par[1],fit$results$par[2],fit$results$par[3])
print(fit$results)
#Location Scale shape
#47.91380457 14.90826196 -0.08899684
print(ksb)
#D = 0.099517, p-value = 0.7866
return.level(fit,return.period=c(50,100,1000))
#97.05897 104.19041 124.83811
fit=fevd(xf,type="GEV",method=c("MLE","GMLE")[2],verbose=TRUE,weights=1)
ksf=ks.test(fit$x,pgev,fit$results$par[1],fit$results$par[2],fit$results$par[3])
print(fit$results)
#Location Scale shape
#45.4775676 13.0846847 0.3677431
print(ksf)
#D = 0.085989, p-value = 0.9042
return.level(fit,return.period=c(50,100,1000))
#159.3110 203.0502 461.0956
#weighted
weights=c(rep(1,35),rep(30,5))
fit=fevd(xb,type="GEV",method=c("MLE","GMLE")[2],verbose=TRUE,weights=weights)
ksb=ks.test(fit$x,pgev,fit$results$par[1],fit$results$par[2],fit$results$par[3])
print(fit$results)
#Location Scale shape
#69.05423757 20.14142692 0.03734749
print(ksb)
#D = 0.50196, p-value = 0
return.level(fit,return.period=c(50,100,1000))
#153.6599 170.1430 227.7687
fit=fevd(xf,type="GEV",method=c("MLE","GMLE")[2],verbose=TRUE,weights=weights)
ksf=ks.test(fit$x,pgev,fit$results$par[1],fit$results$par[2],fit$results$par[3])
print(fit$results)
#Location Scale shape
#80.88160150 30.12867059 0.05011096
print(ksf)
#D = 0.57544, p-value = 0
return.level(fit,return.period=c(50,100,1000))
#210.7223 236.7541 329.5452