Closed JeremyGelb closed 5 years ago
Thanks for the suggestion! I will take a closer look at these papers and see if the suggested approaches should be implemented in brms.
You may find this helpful: http://www.r-inla.org/spde-book. If you haven't seen it already. I'm not sure if it's entirely relevant or not.
@oliverdechant Thanks for the link ! I will have a closer look on it as soon as possible even if it doesn't seem to be related to restricted spatial regression
Juste to complete my first comment : if the implementation is feasible, maybe the method could be extended to temporal autocorrelation structures (ar, ma and arma ...) that is some manner are related to spatial autocorrelation structures.
After taking a detailed look at these papers, I see why they describe relevant approaches. However, I think the solution they discuss is not general enough to be used in brms. Specifically, they only consider orthogonlizing after the fixed effects, which is easy using standard algebra of linear regression. However, brms has so many more terms, which do not fall within this fixed effects matrix, for instance multilevel terms (i.e., random effects), splines, or measurement error terms to name only a few. Orthogonalizing only to a part of the predictor term seems very inconsistent for me and may have hard-to-predicto consequences for the confounding with other terms. Also, it breaks the internal separation between different terms as the fixed effects have to be taken into account in the autocorrelation structure. It also makes post-processing with new data more complicated, as we have to rescale predictions with new data according to the original fixed effects matrix. Taking together, I don't think this approach will eventually be implemented in brms and I am thus closing this issue. This is not because I don't think it's a relevant approach, but because it does not fit into the brms framework.
I believe this issue raises a more general and interesting question, which you also noted in your latest post: In a model of the form y ~ multi_normal(mu, Sigma), it makes a huge difference whether the (time or spatial) autocorrelation parameters are expressed as part of mu or as part of Sigma. If they are part of mu, they may act as potential confounders on other parts of mu (unless orthogonalized), but if they are part of Sigma, they don't act as confounders in the way that they don't affect the mean. This is preicsely the reason, why I support two ARMA version, one that works as part of mu and one that works as part of Sigma. I didn't have time to look at this in detail and don't know if anyone has analysed this already in a more general framework (independing on how exactly the time or spatial autocorrelation looks like). But, naively perhaps, it looks like an interesting siutation that may be worth investigating further.
Dear Paul,
Thank you for the following up. Your are totally right about the fact the method is not general enough considering all the terms included in brms. I am not sure to fully understand the second part of your response. What would be the benefit to model sigma as spatially (or temporally) autocorrelated instead of mu ? I will keep you updated if I find something more general about that problem.
No, it is not that Sigma would be autocorrelated, but that the autocorrelations would be incorporated in the model via Sigma, that is via residual autocorrelation.
That is interesting but I guess that the implementation will be tricky. Moreover, that method will not work for distributions without a distribution parameter like binomial or poisson. Well thank you again for your help and the great job you do in brms development and maintenance.
You are only partially correct. Indeed, explictely expressing the covariance matrix of the autocorrelation stucture may be tricky and not always possible, but for ARMA(1, 1) (or AR(1) or MA(1) or course), it definitely is (and maybe for others as well). We can add such structures to non-normal models by adding latent residuals in the form of a "random effect" with as many levels as observations and then modeling the covariance of those according to the autocorrelation process. This can work well for instance for poisson models and (non-binary) binomial models and is actually implemented in the github version of brms.
Dear Paul,
First, thank you for brms. It is always a pleasure to work with it.
The possibility to include spatial autocorrelation structures in models like car / icar / sar etc. is a really good feature. Recently, I read a bit about car models and I have found an interesting developed argument by Hodges, J. S., & Reich, B. J. (2010) (https://amstat.tandfonline.com/doi/abs/10.1198/tast.2010.10052) and others.They argue that the spatially-correlated random effect is equivalent to adding a saturated collection of canonical regressors which could lead to multicolinearity wiht the fixed effects. Hanks et al.(2015) (https://onlinelibrary.wiley.com/doi/10.1002/env.2331), make a nice summary of the problem : "In spatial generalized linear mixed models (SGLMMs), covariates that are spatially smooth are often collinear with spatially smooth random effects. This phenomenon is known as spatial confounding. "
A solution presented is the restricted spatial regression : the spatial term is constrained to be orthogonal with the fixed effects. The two references presented above give details about model specification, and it seems that this package : https://cran.r-project.org/web/packages/ngspatial/ngspatial.pdf has already implemented it. Do you think that this type of autocorrelation structure could be implemented in brms ?