16.9 Summarizing results
But, what if we want to say something about statistical significance without doing model selection? In MLE analyses and all of our statistical hypothesis testing so far, we have used p-values. However, you might notice that there is no p-value associated with our model output above!
One of the easiest ways to assess statistical significance of a coefficient in Bayesian inference, is to simply compare one or more posteriors in a method similar to that used for t-tests and ANOVAs earlier in the book. To do this, we will extract the posterior estimates for loglength (our beta or slope coefficient) and compare the sampling distribution to some value of interest. For most linear-regression-type models we are interested in comparing the coefficient to zero. If the 95% Credible interval for our coefficient estimate includes zero then we fail to reject the null. If zero is outside the 95% CRI, then we reject the null and conclude that the relationship is statistically significant.
Sounds simple enough, right? Let’s try it out!
First, use the as.matrix()
function to extract the posterior estimates for our coefficients and package them in a data.frame()
.
If you have a look you will notice that we now have a data.frame with three columns (Intercept
, loglength
, and sigma
) and 4,000 rows. There is one row for each of our model iterations in this case, so we get 4,000 estimates of each parameter!
Have a look:
## X.Intercept. loglength sigma
## 1 -8.405247 3.020850 0.1571598
## 2 -8.494797 3.049248 0.1598961
## 3 -8.463394 3.039873 0.1593970
## 4 -8.506015 3.052068 0.1594148
## 5 -8.436514 3.031535 0.1580567
## 6 -8.436826 3.032928 0.1578346
This is great! Now, if we want we can calculate descriptive statistics for any of these parameters or combine them in any other way that might be meaningful. Here, we are interested in the coefficient (beta) for loglength
, so let’s check it out.
Calculate the mean:
## [1] 3.039513
Calculate 95% CRI:
## 2.5% 97.5%
## 3.006317 3.072871
We can see that the 95% CRI excludes zero, so we can now say that the relationship is statistically significant. Of course, this is obvious if you know anything about biology, so we could compare to any other meaningful value. For example, we use a value of 3.00 to represent “isometric growth” in biology and could apply the same approach here to that value. Since 3.00 is outside the 95% CRI, we would determine that growth is not isometric for these populations, but rather “positively allometric”. Sweet biology.