# NOT RUN {
# Simulate from GLO and refit it. Occasionally, the simulated data
# will result in MLE or MPS failing to converge, just a note to users.
# This example also shows the use of the attributes of the Results.
set.seed(3237)
x <- rlmomco(32, vec2par(c(2.5, 0.7, -0.39), type="glo"))
three.para.est <- x2pars(x, type="glo")
FF <- nonexceeds() # a range in nonexceedance probabilities
# In the event of MLE or MPS failure, one will see NA's in the Results.
Results <- pars2x(FF, three.para.est, na.rm=FALSE)
sum <- attr(Results, "all.summary")
plot(pp(x), sort(x), type="n", ylim=range(sum), log="y")
polygon(attr(Results, "f.poly"), attr(Results, "x.poly"), col=8, lty=0)
points(pp(x), sort(x), col=3)
lines(Results$f, Results$lmr, col=1) # black line
lines(Results$f, Results$mle, col=2) # red line
lines(Results$f, Results$mps, col=4) # blue line
lines(Results$f, Results$mean, col=6, lty=2, lwd=2) # purple mean #
# }
Run the code above in your browser using DataLab