Spatial ANCOVA in R
On Mon, Nov 17, 2008 at 12:48 AM, Carsten Dormann
<carsten.dormann at ufz.de> wrote:
Dear Camilo, I hope I interpret correctly what you want. In AN(C)OVA you are primary interested to see, whether a variable significantly contributes to the explanation of the observed variance, right? Spatial models by and large try to "do away with" spatial autocorrelation (SAC), so that coefficient estimates are unbiased by SAC.
Just wanted to point out that (as I assume Carsten is aware) the OLS
estimates of model coefficients remain unbiased under spatial
autocorrelation (or any other process resulting in non-zero values
off-diagonal elements of the error covariance matrix). However, the
GLS estimates ((X'\Omega^{-1}X)^{-1}X'\Omega^{-1}y, where y ~ (X\beta,
\sigma^2 \Omega)) are BLUE by the Gauss-Markov Theorem.
Also, although I agree with Carsten that spatial modelers often try to
'do away with' spatial autocorrelation in an effort to get better
estimates of the coefficients, I think this is often the wrong view.
E.,g, in the GLS setting it is not uncommon for the spatial
autocorrelation parameters to be of at least as much biological
interest as the \betas.
Kingsford Jones
Hence, an applying the anova-function to, say, a spatial eigenvector mapping GLM (function ME in spdep) will give you the explained deviance for each effect, including the spatial eigenvectors. ANCOVA and regression models are fundamentally identical, only they focus on different aspects of the results (deviance explaind vs. coefficient estimates). Spatial models are similar to mixed effect models (and sometimes ARE mixed effect models), so I can see no reason why not to treat them in the same way as any other regression/ANOVA-model: run a GLM, use anova(., test="Chisq") on the model, done. Not all spatial methods may offer a generic anova-function, but the majority does (gls in nlme does, glmmPQL can be (wrongly!) forced to respond by using anova.lme(.), while spautolm and spsarlm provide no anova-function). In these cases, you have to have to resort to model comparison, i.e. comparing a spatial model with and without the effect of interest (obeying marginality and nestedness of models). The difference in deviance explained can be attributed to the effect of the omitted variable. HTH, Carsten P.S.: Let me advertise some own work here, if I may (open access pdf on the journal's or my homepage): Dormann, C. F., J. M. McPherson, M. B. Ara?jo, R. Bivand, J. Bolliger, G. Carl, R. Davis, A. Hirzel, W. Jetz, W. D. Kissling, I. K?hn, R. Ohlem?ller, P. R. Peres-Neto, B. Reineking, B. Schr?der, F. M. Schurr, and R. Wilson. 2007. Methods to account for spatial autocorrelation in the analysis of species distributional data: a review. Ecography 30:609-628. With R-code for all methods in the appendix, of course. Camilo Mora wrote:
Hi: Does anyone know if it is possible to run an ANCOVA in R while accounting or controlling for spatial autocorrelation? I have found usefull information into how to account for spatial autocorrelaion in regression models but not much into how to deal with the problem in an ANCOVA. Thanks, Camilo Camilo Mora, Ph.D. SCRIPPS Institute of Oceanography University of California San Diego San Diego, USA Phone: (858) 822 1642 http://cmbc.ucsd.edu/People/Faculty_and_Researchers/mora/ And Department of Biology Dalhouisie University Halifax, Canada Phone: (902) 494 3910 http://as01.ucis.dal.ca/fmap/people.php?pid=53
_______________________________________________ R-sig-ecology mailing list R-sig-ecology at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
-- Dr. Carsten F. Dormann Department of Computational Landscape Ecology Helmholtz Centre for Environmental Research UFZ Permoserstr. 15 04318 Leipzig Germany Tel: ++49(0)341 2351946 Fax: ++49(0)341 2351939 Email: carsten.dormann at ufz.de internet: http://www.ufz.de/index.php?de=4205
_______________________________________________ R-sig-ecology mailing list R-sig-ecology at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology