if (FALSE) {
sim.data <- list("Lambert W x Gaussian" =
rLambertW(n = 100, distname = "normal",
theta = list(gamma = 0.1, beta = c(1, 2))),
"Cauchy" = rcauchy(n = 100))
# do not use lapply() as it does not work well with match.call() in
# bootstrap()
igmm.ests <- list()
conv.analyses <- list()
for (nn in names(sim.data)) {
igmm.ests[[nn]] <- IGMM(sim.data[[nn]], type = "s")
conv.analyses[[nn]] <- analyze_convergence(igmm.ests[[nn]])
}
plot.lists <- lapply(conv.analyses, plot)
for (nn in names(plot.lists)) {
plot.lists[[nn]] <- lapply(plot.lists[[nn]], "+", ggtitle(nn))
}
require(gridExtra)
for (jj in seq_along(plot.lists[[1]])) {
grid.arrange(plot.lists[[1]][[jj]], plot.lists[[2]][[jj]], ncol = 2)
}
}
Run the code above in your browser using DataLab