Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
A couple of weeks ago, I posted about how much we can expect to learn about the state of the world on the basis of a statistical significance test. One way of framing this question is: if we’re trying to come to scientific conclusions on the basis of statistical results, how much can we update our belief that some relationship measured by
After writing that post, two additional questions occurred to me:
- Does integrating prior information directly into the analysis, via the usual Bayesian techniques, address the problem in such a way that we can simply read the information directly off a plot of the posterior distribution?
- If the answer isn’t just “employ Bayesian methods and look at a posterior,” is there a better way of communicating how much we can learn (in a scientific sense) ?
To answer the first question: it all depends, I suppose, on exactly how we think about Bayesian statistics. There’s no question in my mind that the rational belief distribution about
It’s extremely common, in both frequentist and Bayesian circles, to report 95% confidence intervals (credible regions in the Bayesian parlance, i.e. when they refer to posteriors that integrate a prior). Several methodologists in multiple disciplines have proposed reporting 95% CIs as an alternative to traditional hypothesis testing with p-values or t-ratios. It’s an idea that makes a lot of sense to me, in that it does a better job of communicating the true degree of uncertainty in a coefficient estimate and (perhaps) steers us away from cutpoint-style judgments.
However, the coverage of 95% credible regions with a properly specified prior is still surprisingly uninformative about the underlying state of the world. To demonstrate this, I’ve created an R script that simulates data from a simple linear model:
where
I generate 5,000 data sets with 100 observations each from the two DGPs, then calculate the proportion of the time that the 95% credible region of a properly formulated posterior distribution actually covers zero. I do this for four different normal prior distributions, all centered on
I then calculated:
This gives the proportion of the time that
This graph tells us the pattern of coverage of 95% CIs we would expect to see if the true
So: for reasonably weak
What to do? Perhaps there’s a way to communicate how much information any given result contains. I have a procedure that I think makes sense. I’ll start in the frequentist framework: no priors (or flat priors, if you prefer). Rather than changing the certainty of the prior, I’ll adjust the underlying chance that the world is one where the true value of
This is a frequentist way of approaching uncertainty about the state of the world: we say that the data generating process is drawn from a population of DGPs where there is some proportion for which
If this all sounds a bit confusing, that’s probably because frequentist resampling logic is itself a little confusing. Or because I’ve messed something up.
Here’s the procedure:
- Run an analysis (e.g., linear regression) and recover parameter estimates
and associated 95% confidence intervals. - Use Monte Carlo analysis to simulate 2,000 data sets from the data-generating process assuming that
, and 2,000 data sets from the data-generating process assuming that . - Compute the proportion of the time that the 95% CI excludes zero in both cases.
- Compute
| CI excludes zero) for a variety of different underlying proportions of , then graph one against the other.
This is the procedure used to create the plot depicted below.
This graph was generated from an analysis of a single data set, sample size 100, generated out of the DGP
As you would expect, results get better if a larger sample size is used. If I repeat the analysis above with a data set of size 1000…
The sharper bend in the curve is reflective of the fact that these results are more convincing: the narrower variance in the estimated
The procedure can be adapted to Bayesian inference with priors instead of frequentist resampling… which makes the interpretation a little more straightforward.
- Use Bayesian methods (e.g., MCMCregress) to recover parameter estimates for
and associated 95% confidence intervals using your prior of choice. - Use Monte Carlo analysis to simulate 2,000 data sets from the data-generating process assuming that
, and 2,000 data sets from the data-generating process assuming that . - Run Bayesian analyses on all the Monte Carlo data sets using a mean-zero, specified-variance prior (
) to compute the proportion of the time that when the 95% CI excludes zero. - Repeat steps 2-3 for a range of
values, computing the proportion each time. - Plot the proportion of the time that
when the 95% CI excludes zero against the values of .
This graph (for the same data and analysis as the earlier plot) looks like this:
The x-axis shows the diffuseness of the prior belief distribution about
As far as I can tell, the disadvantages of the fully Bayesian method are computational (it takes forever to compute all these points) and precision-related (the computational time means that fewer draws are used to compute each point in the graph, leading to greater error).
In conclusion: the plot that I’ve proposed might be a valid way to communicate to a reader precisely how much information is contained in a statistical result. One common theme: if we have diffuse priors (or expect that our analysis comes out of a population with mostly null DGPs), a single statistical result doesn’t individually say much. Even a good one! But, as more studies are conducted and our priors become narrower (or our knowledge of the population of DGPs indicates fewer nulls), each result becomes more important and informative.
All the R code for the analysis in this post is contained here.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.