[R-sig-eco] relative compositional dissimilarity among sites against a continuous variable

Pekin, Burak K bpekin at purdue.edu
Wed Nov 24 23:53:40 CET 2010


When I run adonis with the following code:  adonis (MamPA ~ Mam_tot, data=summary, method="bray", zerodist="add")

I get the error message: Error in G * t(hat) : non-conformable arrays

What does non-conformble arrays mean?


-----Original Message-----
From: Jari Oksanen [mailto:jari.oksanen at oulu.fi] 
Sent: Wednesday, November 24, 2010 5:43 PM
To: Pekin, Burak K
Cc: 'r-sig-ecology at r-project.org'
Subject: Re: [R-sig-eco] relative compositional dissimilarity among sites against a continuous variable

On 25/11/10 00:37 AM, "Pekin, Burak K" <bpekin at purdue.edu> wrote:

> Thanks Jari, so in essence I would be doing something like a PERMANOVA.

Burak,

Very vaguely similar (some people would say "no, not at all"). If you want to do something like PERMANOVA and do it in R (instead of using Marti Anderson's PERMANOVA standalone software binaries in Windows), you can use
adonis() of vegan  which does this like it should be done.

Cheers, Jari Oksanen
> 
> -----Original Message-----
> From: Jari Oksanen [mailto:jari.oksanen at oulu.fi]
> Sent: Wednesday, November 24, 2010 5:35 PM
> To: Pekin, Burak K; 'Andy Rominger'
> Cc: 'r-sig-ecology at r-project.org'
> Subject: Re: [R-sig-eco] relative compositional dissimilarity among 
> sites against a continuous variable
> 
> On 24/11/10 23:48 PM, "Pekin, Burak K" <bpekin at purdue.edu> wrote:
> 
>> Thanks Andy, that's a simple enough calculation. So the larger the 
>> average dissimilarity, the more the site is dissimilar in its 
>> composition to other sites. I could then do a regression between the 
>> average dissimilarity of sites and other site factors and say 
>> something like 'compositional dissimilarity increases as factor X increases'.
> Burak,
> 
> If this is really what you need, remember that diagonal elements of 
> the dissimilarity matrix are zeros (dissimilarity between the object and itself).
> This means that the row or column mean of the dissimilarity to
> *other* sites is underestimated. You should either make the diagonal to NA:
> 
> d <- as.matrix(vegdist(x))
> diag(d) <- NA
> rowMeans(d, na.rm = TRUE)
> 
> or adjust the means for one zero element:
> 
> d <- as.matrix(vegdist(x))
> rowMeans(d)*(nrow(d)/(nrow(d)-1))
> 
> This does not influence the ranks, but it doesn't hurt if your numbers 
> are correct.
> 
> 
>> 
>> Is there a method that regresses the relative compositional 
>> dissimilarity among sites against a continuous variable?
>> 
> 
> The mean dissimilarity is found for your observations, so it is of the 
> same length as your data vectors. You can use functions like lm(), 
> glm(), nls(),
> gam() or some hundred other alternatives in packages to analyse the results.
> 
> Cheers, Jari Oksanen
>  
>> -Burak
>> 
>> From: Andy Rominger [mailto:ajrominger at gmail.com]
>> Sent: Tuesday, November 23, 2010 4:11 PM
>> To: Steve_Friedman at nps.gov
>> Cc: Pekin, Burak K; r-sig-ecology-bounces at r-project.org;
>> r-sig-ecology at r-project.org
>> Subject: Re: [R-sig-eco] Dissimilarity ranking
>> 
>> or perhaps could you use something as simple as the mean 
>> dissimilarity?  i'm thinking something like this:
>> 
>> library(vegan)
>> 
>> ##    some data to play with, 20 sites by 30 spp
>> data(dune)
>> 
>> ##    calculate distance, making it a matrix
>> dune.dist <- as.matrix(vegdist(dune,method=
>> "bray"))
>> 
>> ##    take average distance
>> dune.avg <- apply(dune.dist,1,mean)
>> dune.avg
>> 
>> not sure what the gurus of dissimilarity analysis might think of this.
>> good luck,
>> andy
>> 
>> On Tue, Nov 23, 2010 at 5:43 PM,
>> <Steve_Friedman at nps.gov<mailto:Steve_Friedman at nps.gov>> wrote:
>> Burak
>> 
>> You should explore the use of non-metric multidimensional scaling.
>> 
>> ?cmdscale
>> 
>> Steve Friedman Ph. D.
>> Ecologist  / Spatial Statistical Analyst Everglades and Dry Tortugas 
>> National Park
>> 950 N Krome Ave (3rd Floor)
>> Homestead, Florida 33034
>> 
>> Steve_Friedman at nps.gov<mailto:Steve_Friedman at nps.gov>
>> Office (305) 224 - 4282
>> Fax     (305) 224 - 4147
>> 
>> 
>> 
>>             "Pekin, Burak K"
>>             <bpekin at purdue.ed
>>             u>                                                         To
>>             Sent by:
>> "'r-sig-ecology at r-project.org<mailto:r-sig-ecology at r-project.org>'"
>>             r-sig-ecology-bou
>> <r-sig-ecology at r-project.org<mailto:r-sig-ecology at r-project.org>>
>>             nces at r-project.or<mailto:nces at r-project.or>
>> cc
>>             g
>>                                                                   Subject
>>                                       [R-sig-eco] Dissimilarity ranking
>>             11/23/2010 03:09
>>             PM
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Hello, I want to rank the dissimilarity of sites based on their 
>> species composition. For example, I would like to be able to say that 
>> site A is less similar in composition to the other sites than site B 
>> is similar to the other sites. I could do a cluster analysis and look 
>> at which sites are less closely clustered.
>> 
>> It would be even better if I could come up with a quantitative scale 
>> rather than a relative ranking that would give a value for each site 
>> based on its relative dissimilarity to the rest of the sites. So site 
>> A might receive a
>> 90 out of 100, whereas site B and C might receive a 60 and a 50 
>> indicating the rank as well as 'relative quantity' of dissimilarity 
>> for each site.
>> 
>> Thanks,
>> Burak
>> 
>> --------------------------
>> 
>> Burak K. Pekin, PhD
>> Postdoctoral Research Associate
>> Purdue University
>> 
>> 
>>             [[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-sig-ecology mailing list
>> R-sig-ecology at r-project.org<mailto: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<mailto:R-sig-ecology at r-project.org>
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>> 
>> 
>> [[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-sig-ecology mailing list
>> R-sig-ecology at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> 



More information about the R-sig-ecology mailing list