# Simultaneous and Pointwise Confidence Bands for GAMs

I am performing a penalized B-spline regression on a simple time series of count data in R using the mgcv package. When I calculate a pointwise confidence band from the standard error of the fit based on the estimated degrees of freedom, it turns out to be slightly wider than the simultaneous confidence band produced by posterior simulation of the fitted GAM (as per: Confidence interval for GAM model). As per Wood (2006), I'm using the Bayesian posterior covariance matrix from mgcv.

Some difference may be attributable to using the t distribution for calculating the pointwise band and assuming a multivariate normal for the posterior simulation, but I had expected the latter to reflect more uncertainty about the mean response due to the multiple comparisons issue. Am I correct in assuming that approximate equivalence of the simultaneous and pointwise confidence bands is a special case, and if so, are there specific conditions required to obtain this result?

Wood, S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC.

• I'm pretty sure there's a error in my thinking in the simultaneous intervals blog post I linked to in the Q&A you quote here. There's been some recent discussion in the comments there. Dec 13, 2016 at 21:52
• Now I'm certain there was a flaw in my original thinking (quite what I was thinking escapes me now as I did know how to do the simultaneous intervals properly at the time). I have a new post up which does the simultaneous intervals in the way I had originally come across them in Ruppert, Wand, and Carroll's Semiparametric Regression book. That post is here: fromthebottomoftheheap.net/2016/12/15/… I'm sorry to have caused confusion or wasted your time with that original post. Dec 16, 2016 at 17:56

I'm pretty sure there's a error in my thinking in the simultaneous intervals blog post I linked to in the Q&A you quote here. There's been some recent discussion in the comments there.

Now I'm certain there was a flaw in my original thinking (quite what I was thinking escapes me now as I did know how to do the simultaneous intervals properly at the time). I have a new post up which does the simultaneous intervals in the way I had originally come across them in Ruppert, Wand, and Carroll's Semiparametric Regression book. That post is here: http://www.fromthebottomoftheheap.net/2016/12/15/simultaneous-interval-revisited/ I'm sorry to have caused confusion or wasted your time with that original post.