Nested loop plots

options(width = 150)
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.align = "center", fig.width = 7,
  out.width = "80%"
)

As of version 0.6.0, rsimsum supports the fully automated creation of nested loop plots (Rücker and Schwarzer, 2014).

library(rsimsum)

A dataset that can be purposefully used to illustrate nested loop plots is bundled and shipped with rsimsum:

data("nlp", package = "rsimsum")

This data set contains the results of a simulation study on survival modelling with 150 distinct data-generating mechanisms:

head(nlp)

Further information on the data could be find in the help file (?nlp).

We can analyse this simulation study using rsimsum as usual:

s <- rsimsum::simsum(
  data = nlp, estvarname = "b", true = 0, se = "se",
  methodvar = "model", by = c("baseline", "ss", "esigma")
)
s

Finally, a nested loop plot can be automatically produced via the autoplot method, e.g. for bias:

library(ggplot2)
autoplot(s, type = "nlp", stats = "bias")

However:

  1. Nested loop plots are suited for several DGMs but not for several methods;
  2. The decision on how to nest the results is subjective - the top-level of nesting receives most emphasis;
  3. It gives an overall impression, without focusing too much on details;
  4. It is cumbersome to incorporate Monte Carlo errors in the plot.

References



Try the rsimsum package in your browser

Any scripts or data that you put into this service are public.

rsimsum documentation built on May 21, 2021, 5:06 p.m.