[R-sig-eco] Spatial ANCOVA in R

Kingsford Jones kingsfordjones at gmail.com
Sun Nov 23 19:55:39 CET 2008


Hi Carsten,

Thanks for the interesting reply.  I agree with your assessment -- we
were each thinking of a different type of bias.  But, I think we can
(if we wish) stick with the rigor of a single mathematical definition
of bias (i.e., E[\hat{\theta}] - \theta) where E[\hat{\theta}] is the
expected value of our estimator of the true value \theta).  Then, it
seems that when you mentioned bias you were speaking in terms of the
model (i.e. \theta is some theoretical true model and \hat{\theta} is
our estimator of it), while I was speaking of the estimates of model
parameters when, as you correctly pointed out, the model is correct.

best,

Kingsford Jones

On Thu, Nov 20, 2008 at 1:46 AM, Carsten Dormann <carsten.dormann at ufz.de> wrote:
> Dear Kingsford and others,
>
> the term "unbiased" may mean different things in different disciplines.
> Although OLS is "unbiased" in a statistical sense, it may still me "wrong"
> (to avoid the term "biased" here) in an ecological sense. Imagine spatial
> autocorrelation emerging from the omission of an important variable which is
> in itself spatially autocorrelated (such as soil moisture down a hill
> slope). A non-spatial OLS will be able to calculate coefficient estimates
> for such a model, and the estimates will be asymptotically unbiased, but
> ecologically the omission of an important variable will introduce a tendency
> away from the underlying "true" parameters. In such cases, spatial
> autocorrelation in the data (due to a "wrongly" specified model) will "bias"
> parameter estimates - but only in an ecological sense, not in a statistical!
> (Or, in other words: "biased" in a statistical sense means something like
> incorrect given the right model structure. However, in spatial ecology, the
> model structure may be misspecified and hence the results are "away from the
> truth".)
>
> So, when I was (too nonchalently) writing of spatial models "doing away
> with" spatial autocorrelation and hence to deliver "unbiased" estimates, I
> was referring to the ecological "unbiasedness", not the statistical.
> Kingsford Jones was absolutely correct to pick this point up!
>
> I also agree with the point that the "trick" spatial models use to model
> spatial autocorrelation may well contain very interesting ecological
> information, say on the spatial scale of species interactions, foraging
> behaviour, aggregational patterns and so forth. I thus particularly like
> approach such as Spatial Mapping of Eigenvectors (e.g. Griffith & Peres-Neto
> 2006) and Spatial Filtering (Diniz-Filho & Bini 2005) and Spatial Wavelets
> (Carl et al. 2008), because their additional spatial variables can be mapped
> and thus provide a geographical starting point to elucidating the processes
> behind spatial autocorrelation.
>
> Carsten
>
>
> Carl, G., Dormann, C.F., & Kühn, I. (2008) A wavelet-based method to remove
> spatial autocorrelation in the analysis of species distributional data. Web
> Ecology, 8, 22-29.
> Diniz-Filho, J.A. & Bini, L.M. (2005) Modelling geographical patterns in
> species richness using eigenvector-based spatial filters. Global Ecology &
> Biogeography, 14, 177-185.
> Griffith, D.A. & Peres-Neto, P.R. (2006) Spatial modeling in ecology: the
> flexibility of eigenfunction spatial analyses in exploiting relative
> location information. Ecology, 87, 2603-2613.
>
>
>
>
>
> Kingsford Jones wrote:
>>
>> 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
>>>
>>>
>>
>> _______________________________________________
>> 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