# NOT RUN {
## visualise three LNRE models trained on same data
m1 <- lnre("zm", Dickens.spc)
m2 <- lnre("fzm", Dickens.spc)
m3 <- lnre("gigp", Dickens.spc)
plot(m1, m2, m3, type="types",
xlim=c(1e-8, 1e-2), ylim=c(0, 7.5e4), legend=TRUE)
plot(m1, m2, m3, type="probability",
xlim=c(1e-8, 1e-2), grid=TRUE, legend=TRUE)
## cumulative probability distribution is not available for GIGP
plot(m1, m2, type="cumulative", grid=TRUE,
xlim=c(1e-8, 1e-2), legend=c("ZM", "fZM"))
## first argument can also be a list of models with explicit call
models <- lapply(seq(.1, .9, .2),
function (x) lnre("zm", alpha=x, B=.1))
plot.lnre(models, type="cum", grid=TRUE, legend=TRUE)
plot.lnre(models, type="prob", grid=TRUE, legend=TRUE)
# }
Run the code above in your browser using DataLab