Hai Viviane,

your link to the data seems to be broken (No such file).

However I tried to reproduce your problem using the data from [1] and 
could not reproduce this:

library(nlme)
snouter.df <- 
read.table('http://www.oikos.ekol.lu.se/appendixdown/snouterdata.txt', 
header=T, sep="\t")
summary(gls(snouter1.1 ~ rain + djungle, data=snouter.df,
                        correlation=corLin(form=~X+Y)))
dist <- corLin(form=~X+Y)
summary(gls(snouter1.1 ~ rain + djungle, data=snouter.df,
                        correlation=dist))
summary(lm(snouter1.1 ~ rain + djungle, data=snouter.df))

If you haven't already take a look at [1] and the supplements - very 
helpful.


HTH,

Eduard



[1]
F. Dormann C, M. McPherson J, B. Araújo M, Bivand R, Bolliger J, Carl G, 
et al. Methods to account for spatial autocorrelation in the analysis of 
species distributional data: a review. Ecography 2007;30:609--28.

On 04/10/2013 06:55 PM, Viviane Deslandes wrote:
> Hey all,
>
> I need to perform a spatial gls and I'm using nlme package. I constructed a
>   distance matrix using the corLin command Despite the  R to make the matrix
> it seems that is not using to perform the gls, since that the results of
> GLS with this distance matrix are exactly the same that an OLS. Someone
> could help with this or suggesting another package, tutorial or script?
> Here is the script:
> library(nlme)
>
> dat<read.table("
> http://zoo.bio.ufpr.br/pie/data/birds/tyrannidae.dadostyrannidaefinal_semoutlier.txt
> ")
>
> # spatial GLS->peakfreq=NDVI*masse
>
> distgeo=corLin(form=~long+lat)
> peakfreq<-gls(peak_freq~NDVI*masselog10, correlation=distgeo, data=dat)
> summary(peakfreq)
>
> #OLS - peakfreq=NDVI*masse
>
> peakfreq<-lm(peak_freq~NDVI*masselog10,data=dat)
> summary(peakfreq)
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>


	[[alternative HTML version deleted]]

