gpa <- vec2par(c(100,500,0.5),type='gpa')
n <- 20 # the sample size
j <- 15 # the 15th order statistic
F <- 0.99 # the 99th percentile
theoOstat <- qua.ostat(F,j,n,gpa)
if (FALSE) {
# Let us test this value against a brute force estimate.
Jth <- vector(mode = "numeric")
for(i in seq(1,10000)) {
Q <- sort(rlmomco(n,gpa))
Jth[i] <- Q[j]
}
bruteOstat <- quantile(Jth,F) # estimate by built-in function
theoOstat <- signif(theoOstat,digits=5)
bruteOstat <- signif(bruteOstat,digits=5)
cat(c("Theoretical=",theoOstat," Simulated=",bruteOstat,"\n"))
}
Run the code above in your browser using DataLab