# Comparing variance-covariance matrix of residuals and parameters (means) in a glm, glmm, gam model

In OLS, we know the direct relationship between the variance of the estimated model parameters $\beta$ and residual variance $\sigma^{2}$ as: $\textrm{Var} ( \hat{\beta} ) = \sigma^{2} (X'X)^{-1}$. However, very often we have correlated data structure that violate independent residual assumptions. Therefore, we apply models (glmm) with a correlated residual structure using a pre-specified variance-covariance residual matrix, for instance AR1, compound symmetric (random intercept). Another method is to decorrelate the residual coorrelation by building a better relationship of the population mean, using smmother in a GAM model.

My questions are:

1) What is the general relationship between the variance-covariance matrix of residual and model parameters, in both GLMM and GAM models? If I have a specific residual variance-covariance structure, e.g. AR1, how does it influence the variance-covariance structure of the model parameters? Does the variance-covariance structure of the model parameters also inherit some properties of the residual variance-covariance structure?

2) From a more general perspective, is there any literature on comparing GAM and GLMM models in handling correlations in residuals? Are these two methods comparable or they are based on different motives?