Skip to contents

Produces a "tetris plot" highlighting the uncertainty in the selection of variables chosen under repeat sampling.

Usage

plot(x, ...)

# S3 method for tetris_analysis
plot(x, k = 0, ...)

Arguments

x

an output of an analysis_ function of class tetris_analysis.

...

Currently unused.

k

a numeric input used to truncate the number of columns in the "tetris plot". Defaults to 0 meaning no restriction.

Value

A patchwork of two ggplot outputs.

Details

In some cases there may be a large number of combinations along the columns of the plot (joint selection probabilities). Such scenarios can occur when there are many joint selection combinations of empirical size 1/times where times are the number of bootstrap draws. Under those circumstances it might be desired to restrict to a "top set" which ignores those less frequent combinations - effectively "zooming" in on the left-hand-side of the "tetris plot".

Examples

data(iswr_stroke)
iswr_stroke %>%
  bootstrap_data(10, seed = 1234) %>%
  analyse_univariate(response = "dead12",
                     vars = c("Gender", "Age", "Diagnosis", "Coma",
                              "Diabetes", "MI", "Hypertension"),
                     family = "binomial") %>% 
  plot()