I have conducted an analysis in which I start with a set of informed prior parameter distributions, and then conduct sequential analyses that constrain the distributions with data.
I am currently using density plots to visualize these results, but I am wondering how I can most effectively convey the process of parameter constraint to a non-bayesian audience.
Questions
Is there a more effective way to visualize the sequential constraint of parameter uncertainty?
Specifically:
- is there a way to I indicate the progression within the plot?
- would an alternative approach, such as a boxplot, be more effective in communicating the change in range and central tendency?
- would it help to offset the density=0 line so that the lines are not overlapping?
- would it be effective to use sparklines, e.g. with the 95%CI and medians indicated by a point and a value?
- is it appropriate to exclude the y-axis density scale since the area = 1?
I have included two parameters here, although I will actually be plotting between six and fifteen.
Examples
Here are some example data:
n = 10000; set.seed(0)
prior <- data.frame(theta1 = rnorm(n, 10, 3),
theta2 = rnorm(n, 20, 1.5))
posterior1 <- data.frame(theta1 = rnorm(n, 11, 0.5),
theta2 = rnorm(n, 22, 1))
posterior2 <- data.frame(theta1 = rnorm(n, 10.5, 0.3),
theta2 = rnorm(n, 23, 0.8))
My current approach is along the lines of plotting the densities increasingly dark grey to black:
for(i in 1:2){
plot(density(posterior2[,i]), main = colnames(prior)[i],
xlim = c(0,20*i), xlab = '', ylab = '', col = 'red)
lines(density(posterior1[,i]), col = 'darkgrey')
lines(density(prior[,i]), col = 'grey')
}
These figures are from the above example code:
Here is some of the actual data, with the x-axis scaled to focus on posteriors rather than priors, but at this scale the priors, despite being informed, look fairly flat. (These figures also illustrate that the posteriors are from mcmc chains rather than standard densities as in the example above).