if (FALSE) {
par1 <- vec2par(c(0.7, 0.2), type="kmu")
lmr1 <- lmomkmu(par1, nmom=4)
par2.1 <- parkmu(lmr1, alsofitT3=TRUE, verbose=TRUE, trackoptim=TRUE)
par2.1$para
par2.2 <- parkmu(lmr1, alsofitT3T4=TRUE, verbose=TRUE, trackoptim=TRUE)
par2.2$para
par2.3 <- parkmu(lmr1, alsofitT3=FALSE, verbose=TRUE, trackoptim=TRUE)
par2.3$para
par2.4 <- parkmu(lmr1, justfitT3T4=TRUE, verbose=TRUE, trackoptim=TRUE)
par2.4$para
x <- seq(0,3,by=.01)
plot(x, pdfkmu(x, par1), type="l", lwd=6, col=8, ylim=c(0,5))
lines(x, pdfkmu(x, par2.1), col=2, lwd=2, lty=2)
lines(x, pdfkmu(x, par2.2), col=4)
lines(x, pdfkmu(x, par2.3), col=3, lty=3, lwd=2)
lines(x, pdfkmu(x, par2.4), col=5, lty=2, lwd=2)
}
if (FALSE) {
par1 <- vec2par(c(1, 0.65), type="kmu")
lmr1 <- lmomkmu(par1, nmom=4)
par2.1 <- parkmu(lmr1, alsofitT3=TRUE, verbose=TRUE, trackoptim=TRUE)
par2.1$para # eta=1.0 mu=0.65
par2.2 <- parkmu(lmr1, alsofitT3T4=TRUE, verbose=TRUE, trackoptim=TRUE)
par2.2$para # eta=1.0 mu=0.65
par2.3 <- parkmu(lmr1, alsofitT3=FALSE, verbose=TRUE, trackoptim=TRUE)
par2.3$para # eta=8.5779 mu=0.2060
par2.4 <- parkmu(lmr1, justfitT3T4=TRUE, verbose=TRUE, trackoptim=TRUE)
par2.4$para # eta=1.0 mu=0.65
x <- seq(0,3,by=.01)
plot(x, pdfkmu(x, par1), type="l", lwd=6, col=8, ylim=c(0,1))
lines(x, pdfkmu(x, par2.1), col=2, lwd=2, lty=2)
lines(x, pdfkmu(x, par2.2), col=4)
lines(x, pdfkmu(x, par2.3), col=3, lty=3, lwd=2)
lines(x, pdfkmu(x, par2.4), col=5, lty=2, lwd=2)
lines(x, dlmomco(x, lmom2par(lmr1, type="gam")), lwd=2, col=2)
lines(x, dlmomco(x, lmom2par(lmr1, type="ray")), lwd=2, col=2, lty=2)
lines(x, dlmomco(x, lmom2par(lmr1, type="rice")), lwd=2, col=4, lty=2)
}
Run the code above in your browser using DataLab