[R-sig-eco] Spatial ANCOVA in R
Carsten Dormann
carsten.dormann at ufz.de
Mon Nov 17 08:48:29 CET 2008
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. 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
More information about the R-sig-ecology
mailing list