d <- read.table('inp_RF_M.txt',skip=1) vec_q <- sort(d[,1]) nn <- length(vec_q) vec_lq1<-log(vec_q[1:nn-1]) xeps<-vec_q[nn] # Tested value (the maximum value) mm<-nn-1 # Parameter estimation using sample size of mm=nn-1 # (except the tested value) # Type of distribution: Log-Pearson III my <- mean(vec_lq1) sy <- sd(vec_lq1) ry <- mm*sum((vec_lq1-my)^3)/(mm-1)/(mm-2)/sy^3 bb<-4/ry/ry aa<-sy/sqrt(bb) cc<-my-aa*bb # Quantile of tested value in estimated prob.distribution zp<-(log(xeps)-cc)/aa # Non-exceedance probability of tested value pp <-pgamma(zp,shape=bb,rate=1,lower.tail=TRUE,log.p=FALSE) # Quantile of tested value in Standard Normal distribution ueps<-qnorm(pp,0,1,lower.tail=TRUE,log.p=FALSE) # Non-exceedance pprobability in F-distribution peps<-pf((mm-1)/(mm+1)*ueps^2,1,mm-1,lower.tail=TRUE,log.p=FALSE) peps<-(1-peps)/2 # Critical level for the significant lebel b0 b0<-0.05 eps0<-1-(1-b0)^(1/nn) # In the case of peps<=eps0, tested value is rejected. nn mm aa bb cc xeps zp pp ueps peps eps0