lmr <- lmoms(c(123,34,4,654,37,78))
quagov(0.5,pargov(lmr))
if (FALSE) {
lmr <- lmoms(c(3, 0.05, 1.6, 1.37, 0.57, 0.36, 2.2));
par <- pargov(lmr)# LMRQ said to have a linear mean residual quantile function.
# Let us have a look.
F <- c(0,nonexceeds(),1)
plot(F, qlmomco(F,par), type="l", lwd=3, xlab="NONEXCEEDANCE PROBABILITY",
ylab="LIFE TIME, RESIDUAL LIFE, OR REVERSED RESIDUAL LIFE")
lines(F, rmlmomco(F,par), col=2, lwd=4) # heavy red line (residual life)
lines(F, rrmlmomco(F,par), col=2, lty=2) # dashed red (reversed res. life)
lines(F, cmlmomco(F,par), col=4) # conditional mean (blue)
# Notice how the conditional mean attaches to the parent at F=1, but it does not
# attached at F=0 because of the none zero origin.
cmlmomco(0,par) # 1.307143 # expected life given birth only
lmomgov(par)$lambdas[1] # 1.307143 # expected life of the parent distribution
rmlmomco(0, par) # 1.288989 # residual life given birth only
qlmomco(0, par) # 0.018153 # instantaneous life given birth
# Note: qlmomco(0,par) + rmlmomco(0,par) is the E[lifetime], but rmlmomco()
# is the RESIDUAL MEAN LIFE.
}
Run the code above in your browser using DataLab