Hey everyone,
I'm trying to plot some results of a bootstrap, but I'm having trouble doing it in the way a collaborator asked. It is essentially a ridge plot but instead of density or histograms, it just shows a line segment, with the inner 95% a bit thicker, and the outer 5% a bit smaller. With a red dot indicating the value we overserved for our data.
I have included a drawing of what it should look like. And some code that reproduces the information that I have;
A dataframe with bootstrapped samples for 4 coefficients,
A vector of observed coefficients
Hope someone here can point me in the right direction!
df <- data.frame(b0 = rnorm(50),
b1 = rnorm(50, 1),
b2 = rnorm(50, 0.75, 0.3),
b3 = rnorm(50, 2.75, .25))
observed <- c("b0" = 0.15, "b1" = 0.79, "b2" = 0.76, "b3" = 2.71)
reprex::reprex()
#> No input provided and clipboard is not available.
#> Rendering reprex...
Created on 2021-02-11 by the reprex package (v0.3.0)