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().

estimates <- data.frame( as.matrix(cray_model) )

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:

head(estimates)
##   X.Intercept. loglength     sigma
## 1    -8.469077  3.041585 0.1587965
## 2    -8.497330  3.049864 0.1580963
## 3    -8.459683  3.038081 0.1585211
## 4    -8.500968  3.050388 0.1566849
## 5    -8.427594  3.026240 0.1663090
## 6    -8.447470  3.032372 0.1668952

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:

mean(estimates$loglength)
## [1] 3.0391

Calculate 95% CRI:

quantile(estimates$loglength, probs = c(0.025, 0.975))
##     2.5%    97.5% 
## 3.004856 3.071714

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.