Re: [R-sig-eco] repeated measures ANOVA and PERMANOVA (does it exist?)

2018-01-24 Thread Zoltan Botta-Dukat
Hi,

You also try using principal response curves as suggested in this recent 
publication:

dx.doi.org/10.1002/ecs2.2023

Zoltan


2018.01.24. 15:28 keltezéssel, Pedro Pequeno írta:
> Hi,
>
> you could ordinate your observations first (e.g. using NMDS or PCoA), and
> then model the resulting scores using location and time as predictors (if
> you are interested in estimating their independent effects), or using a
> repeated-measures Anova or a GLMM with location as random factor  to
> account for within-location autocorrelation.
>
> Just in case, Legendre & Gauthier (2014) discuss several approaches for
> space-time analyses (
> http://rspb.royalsocietypublishing.org/content/281/1778/20132728.short)
>
> Cheers,
>
> Pedro A. C. L. Pequeno
>
> Em terça-feira, 23 de janeiro de 2018, David Barfknecht <
> dfbarfkne...@outlook.com> escreveu:
>
>> Hello all,
>>
>> I am currently working on a project that uses species occurrence data
>> (0/1) to construct an NMDS ordination where some points are the same
>> location but through time (10 locations X 3 survey times = 30
>> observations). I want to use ANOSIM and PERMANOVA to look at both
>> individual locations controlling for time and all survey periods
>> controlling for location. Basically, I want to look at location and times
>> as separate factors.  I am curious if anyone have ever had to write a
>> script for repeated measures ANOSIM and/or PERMANOVA. I am aware of how to
>> do the unrepeated measures version of these in the vegan package, but not
>> repeated measures versions. Any suggestions?
>>
>> If not, are there other methods more appropriate to investigate this?
>>
>> Thank you in advance for any advice.
>>
>> Sent from Mail for
>> Windows 10
>>
>>
>>  [[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]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


-- 

Botta-Dukát ZoltánZoltán BOTTA-Dukát

Ökológiai és Botanikai IntézetInstitute of Ecology and 
Botany
Magyar Tudományos AkadémiaHungarian Academy of Sciences
Ökológiai Kutatóközpont   Centre for Ecological Research

2163. Vácrátót, Alkotmány u. 2-4. H-2163 Vácrátót, Alkomány u. 
2-4.,HUNGARY
tel: +36 28 360122/138Phone: +36 28 360122/138
fax: +36 28 360110Fax +36 28 360110
botta-dukat.zol...@okologia.mta.hu
botta-dukat.zol...@okologia.mta.hu
http://okologia.mta.hu/Botta-Dukat.Zoltan 
http://okologia.mta.hu/en/Zoltan.BOTTA-DUKAT

*New book:*
Theory-Based Ecology; A Darwinian approach
Authors: Liz Pásztor, Zoltán Botta-Dukát, Gabriella Magyar, Tamás 
Czárán, and Géza Meszéna
Available at Amazon 
,
 
in most major bookstores, or directly from Oxford University Press 

Companion website: http://tbe.elte.hu/

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Re: [R-sig-eco] Thresholds of Synchrony in R

2017-08-03 Thread Zoltan Botta-Dukat
Dear Tania,

I suspect that there is no general threshold.
You can check significance of departure from 0.5 by randomization test:
1)  randomize your data,
2) calculate synchrony for the randomized data
3) repeat step 1 and 2 many times (at least 999)
4) p-value = min(# cases where observed S is higher than random; # cases 
where observed S is lower than random)/(number of randoms +1)

There are (at least) two ways of randomization:
- simply shuffling values within one species' time series - it is 
simple, but destroys the temporal autocorrelation within time series
- shifting values within one one species' time series (as it would be 
circular data) - it preserves the autocorrelation, so I would use it.

Best wishes,

Zoltan

2017.08.02. 18:58 keltez�ssel, Tania Bird �rta:
> Hi all,
> Apologies if this is more a stats question than an R question but I do need
> help with R for the solution.
>
> I'm calculating the degree of synchrony of population fluctuations through
> time in a community, based on Loreau & Mazencourt 2008 paper.
> Loreau, Michel, and Claire de Mazancourt. (2008) "Species synchrony and its
> drivers: Neutral and nonneutral community dynamics in fluctuating
> environments." The American Naturalist 172, no. 2: E48-66.
> doi:10.1086/589746.
>
> I am using this code:
>
> dat = cbind(sp1 = rnorm(100, 10, 2), sp2 = rnorm(100, 10, 2))
>  #Two species with random independent abundance sampled 100 times.
> V = var(dat)   # variance-covariance matrix for all species
>  # calculate synchrony index from covariance matrix
> synchrony = function(V) {
> d = sqrt(diag(V))
> sum(V) /sum(d%*%t(d))
> }
>
> S = synchrony(V)
>
> S runs from 0 (total Asynchrony) to 1 (total Synchrony) with 0.5 = random
> or no synchrony as described by the authors.
>
> I am wondering if there is a to calculate a threshold or value of S at
> which I can say that there is "significant Asynchrony in this community" or
>   significant Synchrony in this community". For example is 0.3 asynchronous
> or not really ?
>
> Should this threshold based on the data range or the variation itself?
> In which case how would I code this calculation?
>
> Or should I just say that anything <0.25 is significantly/very
> Asynchronous?
> In which case how can I generate a column to say
>   if S <0.25 its asynchronous or if its >0.75 its synchronous?
>
> Thanks for your feedback
> Tania
>
>
> Tania Bird MSc
> PhD Student,
> Geo Ecology Lab
> Ben Gurion University
>
>   [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


-- 

Botta-Duk�t Zolt�nZolt�n BOTTA-Duk�t

�kol�giai �s Botanikai Int�zetInstitute of Ecology and 
Botany
Magyar Tudom�nyos Akad�miaHungarian Academy of Sciences
�kol�giai Kutat�k�zpont   Centre for Ecological Research

2163. V�cr�t�t, Alkotm�ny u. 2-4. H-2163 V�cr�t�t, Alkom�ny u. 
2-4.,HUNGARY
tel: +36 28 360122/138Phone: +36 28 360122/138
fax: +36 28 360110Fax +36 28 360110
botta-dukat.zol...@okologia.mta.hu
botta-dukat.zol...@okologia.mta.hu
http://okologia.mta.hu/Botta-Dukat.Zoltan 
http://okologia.mta.hu/en/Zoltan.BOTTA-DUKAT

*New book:*
Theory-Based Ecology; A Darwinian approach
Authors: Liz P�sztor, Zolt�n Botta-Duk�t, Gabriella Magyar, Tam�s 
Cz�r�n, and G�za Mesz�na
Available at Amazon 
,
 
in most major bookstores, or directly from Oxford University Press 

Companion website: http://tbe.elte.hu/

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Re: [R-sig-eco] Adonis for significance of clusteredness from hclust (vegan package)

2016-10-04 Thread Zoltan Botta-Dukat
Dear Ansley,

I cannot answer your question, I hope someone else will answer. I'd 
rather point out a problem in your approach. Statistical tests were 
developed for testing difference between a priori groups, thus estimated 
Type I error rate is valid only for this situation. When you calculates 
Type I error rate for comparison of groups created by cluster analysis 
of the SAME data, the calculated error rate will be lower than the valid 
error rate. So you cannot use the term "significant" in this situation.

Sorry for making you sadden by this information.

Zoltan

2016.10.03. 21:52 keltez�ssel, Ansley Silva �rta:
> Hello:
>
> I have created a dendrograms using hierarchical cluster analysis with the
> vegan package (function: hclust).
>
> By visually observing the dendrogram, I have determined that there are 3
> main clusters if I "cut" the tree at the height 0.25  (please see the
> dendrogram from the code).
> I then created a new dataset, which is essentially the same as the
> original, but I have added the categorical variable Group to represent
> these 3 main clusters.
> ST0 is group a, AP0 and AP100 is group b, and AP200 AP300 ST100 ST200 ST
> 300 is group c.
> I want to now if they are significantly different from each other.  I
> understand, from the output pasted below, that I can accept that there is a
> significant effect of Group.  Is this the only thing I can say from
> Permanova?  What would be the code for a follow up test to look at
> pair-wise significant differences?
> Thanks very much.
>
> Call:
> adonis(formula = species ~ Group, data = environ, permutations = 999)
>
> Permutation: free
> Number of permutations: 999
>
> Terms added sequentially (first to last)
>
>Df SumsOfSqs  MeanSqs F.Model  R2 Pr(>F)
> Group  2   0.40244 0.201219   4.969 0.66528  0.007 **
> Residuals  5   0.20248 0.040495 0.33472
> Total  7   0.60492  1.0
> ---
> Signif. codes:  0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
>
>
>
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


-- 

Botta-Duk�t Zolt�nZolt�n BOTTA-Duk�t

�kol�giai �s Botanikai Int�zetInstitute of Ecology and 
Botany
Magyar Tudom�nyos Akad�miaHungarian Academy of Sciences
�kol�giai Kutat�k�zpont   Centre for Ecological Research

2163. V�cr�t�t, Alkotm�ny u. 2-4. H-2163 V�cr�t�t, Alkom�ny u. 
2-4.,HUNGARY
tel: +36 28 360122/157Phone: +36 28 360122/157
fax: +36 28 360110Fax +36 28 360110
botta-dukat.zol...@okologia.mta.hu
botta-dukat.zol...@okologia.mta.hu
http://okologia.mta.hu/Botta-Dukat.Zoltan 
http://okologia.mta.hu/en/Zoltan.BOTTA-DUKAT

*New book:*
Theory-Based Ecology; A Darwinian approach
Authors: Liz P�sztor, Zolt�n Botta-Duk�t, Gabriella Magyar, Tam�s 
Cz�r�n, and G�za Mesz�na
Available at Amazon 
,
 
in most major bookstores, or directly from Oxford University Press 

Companion website: http://tbe.elte.hu/

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Re: [R-sig-eco] Permanova result interpretation

2016-06-06 Thread Zoltan Botta-Dukat

Dear Tingting,

If you tested an a priori grouping by adonis, you can say that these 
groups significantly different. It means that their difference is bigger 
than the random expectation (= exepected difference between random 
groups with same size).


However, PCoA and UPGMA results indicates that this is not the best 
grouping, i.e. there may be grouping where two groups are more separated.


Best wishes

Zoltan

2016.06.06. 21:32 keltezéssel, Tingting Chen írta:

Dear list,

I have did  PCoA, UPGMA cluster analysis, and adonis on my data. And I got
no clear separation on the PCoA plot and clustering. However the Permanova
test is giving a very small P value. In this case, can I say these two
groups are significantly different?

Thank you very much for any help.

Best,
Tingting


Call:
adonis(formula = mat ~ Condition, data = meta, permutations = )

Permutation: free
Number of permutations: 

Terms added sequentially (first to last)

   Df SumsOfSqs  MeanSqs F.Model  R2 Pr(>F)
Condition  1   0.23217 0.232167  6.3284 0.14606  1e-04 ***
Residuals 37   1.35740 0.036686 0.85394
Total 38   1.58956  1.0
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Tingting Chen

PhD candidate

Whistler Center for Carbohydrate Research

Department of Food Science

Purdue University

745 Agriculture Mall Drive

West Lafayette, IN 47907

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

[R-sig-eco] reprametrization of Lloyd-Taylor function

2016-03-06 Thread Zoltan Botta-Dukat

Dear All,

I tried to fit Lloyd-Taylor function for soil respiration data, but 
convergence is often failed and even if the model converged there is 
extremely high uncertainty in parameter estimates.


The fitted model is: y=a-b/(x-c), where a, b, and c are the parameters. 
(Note that it is not the original Lloyd-Taylor function, in my version 
the dependent variable is the logarithm of respiration).


I have already recognized the origin of the problem: since c

Re: [R-sig-eco] NMDS axes scores

2016-01-17 Thread Zoltan Botta-Dukat

Dear Tom,

I think your idea, using distances instead of ordination scores is 
useful. I prefer remaining as close to raw data as possible; and using 
distances instead of ordination scores follows this rule.


However, your solution in the original form works only when there is 
only one reference site. If there are multiple reference sites, we 
should define distance of each regenerating site to the set of reference 
sites. It can be the mean or minimum of pairwise distances. I think both 
(i.e. min and mean) may be meaningful. If the set of reference sites is 
heterogeneous, I would choose minimum, while otherwise  mean.


Zoltan

2016.01.18. 6:58 keltezéssel, Philippi, Tom írta:

Conny--

Note that Jari's surface fitting is using ordination scores on the
right-hand predictor size of the formula, with some z as the response.

If you need something about species composition as your _response_ variable
in a linear model (e.g., with time, disturbance type, and treatment as
predictors, and perhaps site as a random effect), why not use each stand's
dissimilarity/distance from your reference forest sites?  The trend line
would be compositional distance or dissim v. time, with
color/symbols/whatever for different treatments.  That would have the
advantage of being easily & directly interpretable.  [The use-case where
that would fail is >>100% turnover so lots of 0 similarities to the
reference forests, so step-across or nmds might help put those large
distances in order.]  You might be able to set up the equivalent to your
GLM in adonis to get permutation significance tests.

I hope that this helps, or at least gives you a different way to think
about your problem, or else is so stupid that Jari gets annoyed and blasts
it with a valid solution.

Tom 2

  --
Tom Philippi
Quantitative Ecologist & Data Therapist
National Park Service


On Sun, Jan 17, 2016 at 8:04 PM, Conny  wrote:


Thanks a lot for all the helpful responses and info.

But I’m actually still not sure how to use both NMDS axes as a response
(y) in a regression model - is this even possible??

My overall goal is to model species compositional change over time in a
restoration project (is the system getting more similar to the reference
forest). I would like to create a trend line here in a graph, rather than
just using an ordination plot.

I thought about using the fitted values returned by ordisurf(), but as I
understood it (please correct me if I’m wrong) it will use my restoration
time again as a response and my axes scores as predictors.

  So the z values will represent fitted age values rather than my sample
scores (?) – so it would make no sense to plot it against my restoration
time…

I’m sorry if this is getting a bit confusing.

Cheers,
Conny

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Re: [R-sig-eco] NMDS axes scores

2016-01-11 Thread Zoltan Botta-Dukat

Dear Jari,

What is your opinion about using first few axes of a metric ordination? 
I'm aware that it is meaningless using first two axes of NMDS ordination 
that calculated for three  dimensions. But in my experience, it is often 
useful to use only first few axes of metric ordination instead of raw 
data: no ecological relevant information is lost, only the 'noise' is 
reduced.


Best wishes

Zoltan

2016.01.11. 11:11 keltezéssel, Jari Oksanen írta:

Contrary to common misbelief, NMDS ordination space is **metric**. In vegan, 
the ordination space (= the ordination result) is even guaranteed to be 
Euclidean (in isoMDS it can be Minkowski, but this is not allowed with vegan). 
What is non-metric is the regression from observed dissimilarities to the 
Euclidean distances in ordination space. The reason why we do not recommend 
using NMDS axes as independent beasts is that NMDS tries to preserve the 
*distances* among points. Any orthogonal rotation (= turning of ordination 
space) will change scores along rotated axes, but retain the distances among 
points. The vegan NMDS result is rotated to principal components, but still you 
should avoid thinking that this makes dimensions independent from each other, 
although the first maximizes the dispersion of points and axes are orthogonal 
(non-correlated).

PCA ordination is Euclidean in the same way as NMDS. The difference to NMDS are 
that (1) only Euclidean distances among sampling units can be used in PCA (in 
NMDS you can use any adequate dissimilarity), and (2) the mapping is linear 
(instead of non-metric) from observed dissimilarities to Euclidean 
dissimilarities. Try function stressplot() in vegan to see what this means — it 
is available both for NMDS and rda (PCA) results.  CA is similar to PCA except 
that it is based on weighted Euclidean distances. I won’t go into mathematical 
details, but you can see ?wcmdscale in vegan to see how to get CA as a weighted 
Euclidean ordination of Chi-square transformed data.

PCA and CA have some ordering criteria for their axis and therefore some people 
have used axes from those as independent beasts. I think this is dubious, too, 
but people do it all the time. The PCA/CA also define a multivariate space, and 
taking only one axis as an independent object sounds strange, in particular if 
you take something else than the first axes.

So what to do with NMDS axes? If you take all NMDS axes and their interactions 
in a regression of type ~ axis1 + axis2 + axis1:axis2 then this is equal to 
fitting a linear trend surface, and the interaction term axis1:axis2 takes care 
that the result is invariant under rotation of NMDS space. Function ordisurf() 
in vegan gives further ideas how to fit surfaces to NMDS *space* (instead of 
simple axis). Also, if you think that some direction in NMDS (not necessarily 
parallel to the axes) is good and you have an indicator variable for that, you 
can use MDSrotate() function in vegan to rotate your solution to that direction 
and then take that rotated axis as your explanatory variable.

HTH, Jari Oksanen


On 11 Jan 2016, at 10:38 am, Martin Weiser  wrote:

Hi Conny,

AFAIK NMDS is *non-metric* and represents distances among objects, not
gradients along axes (known or unknown): distances along axes are
stretched as needed locally (NMDS works with rank order), even order of
the elements along axes does not tell anything. NMDS is great if you
want to say: Object A resembles object C more than it resembles object
B, even though C and B are quite similar.
Try this: run NMDS several times, aim for different number of axes (e.g.
1,2,3,5,10) and note the scores of the objects along the first one.  You
*may* get the same thing.

If you need scores of the objects in the ordination, use something with
well defined metrics and axes, e.g. PCA, CA.

HTH,
Martin

On 9.1.2016 05:41, Conny wrote:

Hi all,



it has been frequently pointed out in this group, that NMDS axes scores
shouldn't be used individually for further analysis.

I therefore would like to include both of my NMDS site scores as a response
into a GLM model simultaneously.  Unfortunately, I couldn't find any advice
on how to actually do this. I found a  couple of papers using NMDS scores in
GLMs, but they all seem to use them individually, fitting separate models to
each of the ordination axes.



I'm a bit at a loss here and any advice is very much appreciated,

Conny


[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


--

--
Pokud je tento e-mail součástí obchodního jednání, Přírodovědecká fakulta
Univerzity Karlovy v Praze:
a) si vyhrazuje právo jednání kdykoliv ukončit a to i bez uvedení důvodu,
b) stanovuje, že smlouva musí mít písemnou formu,
c) vylučuje přijetí nabídky s dodatkem či odchylkou,
d) stanovuje, že 

Re: [R-sig-eco] Morisita horn similarity index

2015-11-27 Thread Zoltan Botta-Dukat

Dear Moses,

Vegdist supposes that input data are numbers of individuals not 
percentages. So, I'm afraid it cannot help to Moses.


Cheers,
Zoltan




2015.11.27. 13:17 keltezéssel, Roman Luštrik írta:

Hi,

`vegdist` function of vegan package
 implements
the morisita index. Is this what you're looking for?

Cheers,
Roman


On Fri, Nov 27, 2015 at 4:55 AM, moses selebatso 
wrote:


  Hello
I am trying to analyse diet overlap (level of similarity) between two
species. I have diet composition in %. I have tried to find the best tool,
and thought Morisita horn will do, but I cant find the right package for.
Is this the best tool?
Thank you,
Moses
 [[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology







--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] calculate dispersion index (betadisper, vegan)

2015-07-29 Thread Zoltan Botta-Dukat

Hi Natalie,

Be careful with convex hull volume, because it is zero if points lie on 
a line (an near to zero, if the configuration is close to this), 
independently from the amount of distances.


Zoltan

2015.07.29. 19:26 keltezéssel, Natalie írta:

hi all

I would like to  calculate a dispersion index or similar from the 
results of the vegan function betadisper.
i would like to know if there is a possibility to e.g. calculate the 
volume of the community dispersion(area of the hull in the PCoA) from 
the betadisper results.
common is to show the distance to the centroid.but I have the 
impression the dispersion within communities are not that 
clear,especially if you have similar variance.
The program primer v5 calculates a disperion index based on  the 
similarity percentage.
similarity percentage is not an option since it is mainly based on 
most counted species.


ideas and help are very much appreciated
cheers natalie

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] slope for rarefaction curve

2015-05-10 Thread Zoltan Botta-Dukat

Dear Simone,

Function rarefy uses the function developed by Hurlbert, thus if you 
need slope in a certain point (as your graph suggests) you can calculate 
the derivative of this function. It is not an easy job, because 
factorials should be derived. See cues here how it can be done:


http://math.stackexchange.com/questions/300526/derivative-of-a-factorial

If you need mean slope in an interval, simply calculate the difference 
in the calculated values for the beginning and end of the interval, and 
divide the difference by the length of the interval.


Zoltan

2015.05.10. 23:57 keltezéssel, Simone Ruzza írta:

Dear all,

apologies for the total beginner's question. I was wondering if anyone
can give some advice on how to calculate the slope for the last 10% of
the records of a rarefaction curve computed with rarefy from vegan.
Here is a graphic representation of what I would like to do:

https://dl.dropboxusercontent.com/u/33966347/figure.JPG

I have seen that this has been done in a recent paper and I was
wondering if anyone may have any code snippet to do that. Sorry, maybe
this is something really obvious but I have not quite understood how
to do it.

thanks!

Simone

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] null model selection in functional diversity analysis

2014-10-23 Thread Zoltan Botta-Dukat

Dear Marc,

Try the permutation of trait values! Such permutation does not change 
any of the patterns that you mentioned and probably wanted to be 
constrained.
On the other hand, it removes the correlation between traits and 
environment, and also correlation between traits and abundance.


Cheers,
Zoltan


2014.10.23. 11:43 keltezéssel, Marc Taylor írta:

Dear r-sig-ecology listers,

I am involved in a study whose objective is the see if there relationships
between the functional diversity of the fish community and environmental
factors of the sample site for a number of sites in a bounded environment.
Specifically, we are looking at the parameters of functional richness
(FRic) and functional diversity (RaoQ) as calculated by the R package
FD. We observe certain trends in these indices as related to the
environmental factors in question, and would now like to determine if the
effect of their deviation from a null model is significant or not.

Given the fact that FRic and RaoQ are often correlated with the richness
and diversity, respectively, of the community, many null models are
designed to remove these effects by permutating the abundance matrix while
maintaining the functional trait matrix constant.

Null model descriptions:

1. Own null model - Our first attempt has been to permutate the site
association of individual fishes to site (see function ownNull below). The
result of the null model is that abundance values for sites (rows) and
species (columns) are maintained. The original idea was that we wanted to
maintain the overall site capacity to sustain a certain number of
individuals. Also, since certain species are linked with higher abundances,
these total abundances should be maintained. The rationale was that in the
absence of site-specific environmental controls on species identity,
individuals would roam at random over the entire study region and end up
randomly at the individual sites, each of which has a certain carrying
capacity determining the number of individuals per site, but not their
identity.
Summary of constrained patterns:
 * site abundance (yes)
 * site diversity (no)
 * site richness (no)
 * global spp abundance (yes)
 * global spp frequency distribution (no)

2. Independent swap (Gotelli, 2000) - This model also permutates species
association to site, but randomizes matrix values (i.e. packets of observed
individuals), with the additional constraint that accepted permutations
must maintain site richness (i.e. total number of spp). This model seems in
line with some of our original assumptions, but differs in that it focuses
more on site richness and maintains global species frequency distributions,
i.e. it takes the abundance values of species observed at each site and
randomly assigns them to new sites. My coauthors worried about this last
point - since it locks in large abundance values which might have been very
much a product of site, and therefore abundance at site is not constrained.
Summary of constrained patterns:
 * site abundance (no)
 * site diversity (no)
 * site richness (yes)
 * global spp abundance (yes)
 * global spp frequency distribution (yes)


We would ultimately like to quantify the effect of these environmental
factors on our observed FRic and RaoQ indices, and thus were quantifying
the standardized effect size (SES) based on the null model distribution. Since
only the independent swap method maintains richness, this would seem to be
appropriate for determining FRic. For RaoQ, neither option maintains
diversity, so are either appropriate? Are more than one null model needed?

So, we have two main questions:
1. What would be an appropriate null model given our objectives - One of
these, or another suggestion?
2. Another aspect discussed on this list before (
https://stat.ethz.ch/pipermail/r-sig-ecology/2010-January/001003.html),
concerns that of the uniqueness of the permutated null models (especially
applicable given the constraints of the independent swap algorithm) as well
as the overall variability in null models. Calculating the number of unique
permutated matrices is easy enough, but how would one assess whether null
model variability is of a similar magnitude to that of the original data?

Many thanks in advance for any help on these issues. An example script
illustrating these issues can be found below.

Cheers,
Marc


Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110

Re: [R-sig-eco] cca

2014-08-04 Thread Zoltan Botta-Dukat

Dear Mahnaz,

Maybe the sum of sand+gravel+silt is always 1 or 100%. There are only 3 
canonical axes suggesting that you have only 3 independent environmental 
variables.

cca may handle such cases by this way.

Best wishes

Zoltan


2014.08.03. 17:24 keltezéssel, Mahnaz Rabbaniha írta:

Dear all

I have done cca in vegan pakage;

two text file are included:
*bio*
  [1] Ampharetidae SponoidaeNaeidae  Balanidae
  Gammaridae
[6] Cyprididae   Cardidae Dreissenidae Semelidae

  *mo*
  sand  gravelsilt TOM


vare.cca - cca(bio,mo)
summary(vare.cca)

Biplot scores for constraining variables

   CCA1CCA2CCA3 CA1 CA2 CA3
sand   0.08356 -0.4027 -0.9111   0   0   0
gravel 0.15836  0.8716 -0.4676   0   0   0
TOM0.63367 -0.6390  0.4239   0   0   0

*silt is not in the summary part??/*

Please inform me what is problem


all the best



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] report out by t.test

2014-03-24 Thread Zoltan Botta-Dukat

Dear All,

Jari probably refer to that Mann-Whitney test suppose same shape of the 
distributions (their positions may differ if H0 is false).


Best wishes
Zoltan


2014.03.24. 12:42 keltezéssel, Jari Oksanen írta:

Except that t-test does not assume that *observations* are normally 
distributed, nor that variances are equal.

Avoid non-parametric tests: they assume too much of data properties.

For var.equal assumption in t.test, see ?t.test.

Cheers, Jari Oksanen

From: r-sig-ecology-boun...@r-project.org [r-sig-ecology-boun...@r-project.org] 
on behalf of Richard Boyce [boy...@nku.edu]
Sent: 24 March 2014 13:23
To: r-sig-ecology@r-project.org
Subject: Re: [R-sig-eco] report out by t.test

Mike,

There is no way that your data meet the assumptions of a t-test (normal 
distributions, equal variance). A nonparametric Mann-Whitney (aka Wilcoxon) 
test is much better suited to your data.

Here's what I got when I ran it:

Q-c(13,0,10,2,0,0,1,0,0,1,5)
WD-c(0,0,1,0,0,0,0,0,0,0,1)
wilcox.test(Q,WD)

Wilcoxon rank sum test with continuity correction

data:  Q and WD
W = 86.5, p-value = 0.05119
alternative hypothesis: true location shift is not equal to 0

Warning message:
In wilcox.test.default(Q, WD) : cannot compute exact p-value with ties

This has a p-value quite close to 0.05, giving some evidence that there's a 
difference between your groups. Note that this you have different null and 
alternative hypothesis: groups are the same vs. groups are different.

Rick Boyce

On Mar 24, 2014, at 7:00 AM, 
r-sig-ecology-requ...@r-project.orgmailto:r-sig-ecology-requ...@r-project.org 
wrote:

Message: 1
Date: Sun, 23 Mar 2014 14:21:41 -0700
From: Michael Marsh sw...@blarg.netmailto:sw...@blarg.net
To: r-sig-ecology@r-project.orgmailto:r-sig-ecology@r-project.org
Subject: [R-sig-eco] report out by t.test
Message-ID: 532f5065.7030...@blarg.netmailto:532f5065.7030...@blarg.net
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I test differences between frequency of hits of exotic annual forbs in
plots on  two sites, Q and WD.

Q-c(13,0,10,2,0,0,1,0,0,1,5)
WD-c(0,0,1,0,0,0,0,0,0,0,1)
t.test(Q,WD)

 Welch Two Sample t-test

data:  Q and WD
t = 1.9807, df = 10.158, p-value = 0.07533
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
  -0.3342006  5.7887460
sample estimates:
mean of x mean of y
2.9090909 0.1818182

The p-value is greater than 0.05, thus does not reach the 95% confidence
level, yet the difference in means is reported as not equal to 0.
Am I encountering a one-sided versus two sided comparison that I don't
understand, or is ther another explanation?

Mike Marsh





Richard L. Boyce, Ph.D.
Director, Environmental Science Program
Professor
Department of Biological Sciences, SC 150
Northern Kentucky University
Nunn Drive
Highland Heights, KY  41099  USA

859-572-1407 (tel.)
859-572-5639 (fax)
boy...@nku.edumailto:boy...@nku.edu
http://www.nku.edu/~boycer/
=

One of the advantages of being disorderly is that one is constantly making exciting 
discoveries. - A.A. Milne






 [[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Question on Quadratic and Cubic Parameters

2013-10-04 Thread Zoltan Botta-Dukat

Dear Alexandre,

If your variables have only positive values, there will be strong 
correlation between linear, quadratic and cubic terms that leads to high 
VIF. You can avoid it by centering the variables before calculating 
quadratic and cubic terms:


quadratic-(x-mean(x))^2
cubic-(x-mean(x))^3

Regards,

Zoltan


2013.10.03. 14:49 keltezéssel, Alexandre Fadigas de Souza írta:

Dear colleagues,

I am working on a Linear Mixed Model with nested structure, based on the 
book of Zuur et al. 2009. Mixed Effects Models and Extensions in Ecology with 
R, and have a question to ask to those of you more experienced with this model 
family.

I am using several topographic variables (elevation, slope, convexity, 
facing) and one light-related variable (canopy openness) to explain species 
abundance variation in 85 plots placed on 17 transects dispersed through a 
coastal vegetation complex on sandy soils in northeastern Brazil. The dependent 
variable is axes of a floristic ordination (e.g., NMDS), with one separate 
model adjusted for each axis.

I will use two levels of spatial aggregation as random factors: the 
transects (5 plots per transect) and broad transect clusters (transect clusters 
were logistically conditioned).

In the ecological literature, I have seen the suggestion of including 
quadratic and even cubic versions of the fixed effects variables (in this case 
topographic and light) as a means to account for possible nonlinear effects of 
these variables on the dependent variable. One recent example is

Brunbjerg, A.K., Ejrnæs, R., Svenning, J.-C., 2012. Species sorting dominates 
plant metacommunity structure in coastal dunes. Acta Oecologica 39, 33–42.

However, the inclusion of such quadratic and/or cubic terms in the model 
produces high colinearity levels (VIF  25, sometimes even 38!).

Do you think this is a valid procedure, the inclusion of these polynomial 
terms?
  
Thank you in advance for any ideas,


Alexandre

Dr. Alexandre F. Souza
Professor Adjunto II Departamento de Botanica, Ecologia e Zoologia  
Universidade Federal do Rio Grande do Norte (UFRN)  
http://www.docente.ufrn.br/alexsouza  Curriculo: lattes.cnpq.br/7844758818522706

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] does the kruskalmc posthoc multiple comparison test require equal sample sizes?

2013-09-22 Thread Zoltan Botta-Dukat

Dear Jenni,

Probably xou need the oneway_test function from coin package.

Zoltan

2013.09.22. 18:55 keltezéssel, Jennifer Peterson írta:

Do the sample sizes have to be equal to perform a posthoc multiple comparison 
on nonparamteric data test using kruskalmc? I am unclear on this based on the 
book excerpt provided on Patrick Giraudoux's website.
Also, since the test has no name, how do I site it?

Thanks very much!!
Jenni
--

Jennifer K Peterson
PhD Candidate
Dobson  Graham Groups
Dept. of Ecology and Evolution
Princeton University
jkpet...@princeton.edu
www.jennipeterson.com





[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] (Off-topic) Doubt About Isoclines for 2 competing population (Logistic Growth)

2013-08-13 Thread Zoltan Botta-Dukat

Dear Augusto,

A product is zero only if one of the multipliers is zero.
r2=0 and/or N2=0 are mathematically correct, but biologically 
meaningless solution of the equation.

If r20 and N20 than the only solution is

(1 - alpha21*N1 - alpha22*N2)=0

Best wishes

Zoltan


2013.08.13. 22:09 keltezéssel, Augusto Ribas írta:

Hello dear list members, i was reading the book Primer of Ecology with R
from M Henry H Stevens and got a simple doubt, its not about R but hope
someone could spare one moment with it, its a little off-topic but maybe
could of general interest.

On the chapter 5, more specifically 5.2.1 he start to teach about
iscoclines for 2 populations.
He set the change of one species to zero and solve for the other. My doubt
is about this part:

We have logistic growth for one species and one competitor:

Dn2/dt = r2*N2 * (1 - alpha21*N1 - alpha22*N2)

Then he set Dn2/dt=0, zero change and solve for N2, and we got:

0 = r2*N2 * (1 - alpha21*N1 - alpha22*N2)

The next step is:

0 = 1 - alpha21*N1 - alpha22*N2

And we end with:

N2 = 1/alpha22 - N1 * alpha21 / alpha22

And this end in a line equation that is the iscocline for this 2 species
system, the isocline line for species 2.
I got this part, my doubt is what happens between this two steps:

0 = r2*N2 * (1 - alpha21*N1 - alpha22*N2)

To

0 = 1 - alpha21*N1 - alpha22*N2


How the r2*N2 that multiply everything in the parenthesis vanishes? does it
is simply put on the other side and when divided by zero it becomes zero?
Or there is something more about this?
I dont know if i got this right.




--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] testing if a slope is significantly different from the slope y=x

2013-06-12 Thread Zoltan Botta-Dukat
Dear Edwin,

Your first approach is correct. Since confidence intervals strongly 
related to one-sample tests, you can use one-sample t-test if you want 
p-values. Someone may suggest built-in function for this, but you can 
calculate it easily without such function.

Here is an example:

# creating data, the intercept is zero, the slope is 1.2
x-seq(0,100)
y-rnorm(length(x),mean=1.2*x,sd=15)

# plotting the data
plot(x,y)
abline(0,1)

# fitting linear equation
m-lm(y~x)
summary(m)

# for test we need the slope and its standard error
# we can get both from the summary
sm-summary(m)
sm$coefficients
(slope-sm$coefficients[2,1])
(se.slope-sm$coefficients[2,2])

# the last steps: calculating t-value and probability of type I error
(t.value-(slope-1)/se.slope)
1-pt(t.value,df=length(x)-2)



Best regards,

Zoltan

2013.06.12. 13:46 keltezéssel, Pos, E.T. írta:
 Dear all,

 I'm having trouble with something that I presume is foolishly easy.

 I have a linear model with a slope slightly higher than the slope of y=x. Now 
 I wish to test if the slope of this lm is actually significantly different 
 from the slope of y=x (i.e. 1)

 One option to do this obviously is testing whether 1 falls within the 95% 
 confidence interval of the original lm. I've done this and it gives me an 
 indication but I would like a hard p-value for testing this significance. The 
 problem I run into is that I don't know how to test for the significance of 
 this difference between the slope of my lm and the line y=x.

 Thus far:

 Method #1

 data1.y = some data
 data1.x = some more data
 data1 = lm(data1.y~data1.x)
 abline(data1, col = red, lwd = 2) #draw a line through the regression
 abline(a = 0, b = 1)# which gives me the line for x=y but 
 this doesn't work for ANOVA but is nicely ilustrative

 #Check the 95% confidence interval
 confint(data1)

 Method #2

 # I used offset because I found that on the mailinglist in the archives but 
 I'm not sure why this would indicate the difference is significant from the 
 slope y=x? Any suggestions?
 data1.y = some data
 data1.x = some more data
 data1 = lm(data1.y~data1.x)
 data1.offset = lm(data1.y~data1.x+offset(data1.x))
 summary(data1.offset) #then check if the slope is significantly different 
 from 1

 But I'm not convinced that method number 2 gives me the correct answer. Any 
 idea's here?

 Thanks a lot,

 Edwin.


   [[alternative HTML version deleted]]



 ___
 R-sig-ecology mailing list
 R-sig-ecology@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


-- 
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Rao entropy with presence-absence data

2013-06-12 Thread Zoltan Botta-Dukat

Dear Thomas,




Is it possible, and meaningful, to calculate  Rao`s quadratic entropy 
index (function dbFD from package FD) with presence-absence data?
Yes, it is possible and meaningful. In this case it is simply the mean 
distance between the occurring species.



I don't get a error message but when I use the function with 
(...,scale.Rao=TRUE) the calculations never end.
I think this problem is not related to p/a data. Calculation may demand 
long time for large datasets.
Anyway, I think scaling by the possible maximum is meaningless if you 
don't have abundance data.


Best wishes

Zoltan



Thank you for your answer.

/Thomas




--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] population model with proportions as responses

2013-05-08 Thread Zoltan Botta-Dukat

Dear Milos,



It could be a problem that the predictors (forest_percent + meadow_percent + 
plowland_percent) are non-independent, but I don't know if it's a big problem. 
Maybe someone else could weigh in on that.


Such strong linear relationship between predictors (collinearity) is a 
big problem. If all predictor included, the model becomes ill-defined. I 
suggest including only two of them. Choose the pair of predictor that 
lead to most easily interpretable model (probably choosing the two 
extreme habitat is the best solution).


Best wishes

Zoltan


--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] using Pearson's Chi-squared to verify dependence among species distribuion

2013-05-06 Thread Zoltan Botta-Dukat

Dear Antonio,

chisq.test function uses this equation, but it round the results, thus 
in your example it gives 0 instead of 0.39. For hypothesis testing the 
difference is unimportant, both mean lack of sifnificant association. If 
you need the unrounded values or you want to calculate dissimilarity 
matrix, you should follow Jari's suggestion.


Best wishes

Zoltan

2013.05.01. 10:22 keltezéssel, Jari Oksanen írta:

On 01/05/2013, at 06:09 AM, Antonio Silva wrote:


Thanks Zoltan R R-sig list members

I still with some doubts.

Is there a way to calculate in R the results for the equation

X2= n*[|ad-bc|-(p/2)]^2 / [(a+b)*(c+d)*(a+c)*(b+d)]

(see Legendre  Legendre pg 295 eq. 7.6)

This should be doable in vegan::designdist() function. Set 'abcd = TRUE' and 
you can directly use terms like you defined them above. I won't give the 
equation here as I don't know what is the equation you used: Your previous 
message had a different equation than this one here with some mix up with 'n' 
and 'p'. The designdist() function calculates (dis)similarities between rows. 
You must transpose (t()) your data if you want to have dissimilarities between 
columns. The code is pure R so that you can see how to do these calculations 
yourself.

Cheers, Jari Oksanen


for the following data:


ST01 ST02 ST03 ST04 ST05 ST06 ST07 ST08 ST09  SP1 1 1 1 1 1 0 0 1 1  SP2 1 1
0 1 0 1 0 1 0

We have a=4, b=3, c=1, d=1, N=9 and the 2x2 table for this example is



SP2


Presence Absent
SP1 Presence 4 3
Absent 1 1





Following the Chi square formula I got 110.25 / 280 = 0.3937

I have tried many things, without success.

Thanks in advance for any suggestion.

Antonio Olinto


2013/4/25 Zoltan Botta-Dukat botta-dukat.zol...@okologia.mta.hu


Dear Antonio,

Try this:

chisq.test(table(sp1,sp2))

Best wishes

Zoltan




On Wed, Apr 24, 2013 at 6:02 PM, Antonio Silva aolinto@gmail.com
wrote:


Hi,

I'm trying to use Pearson's Chi-squared to verify the dependence among
species distribuion.

I have a dataframe with the presence/absence data of two species in a
number of sample units

The equation I'm using is:

X2= p*(|ad-bc|-p/2)^2 / ((a+b)*(c+d)*(a+c)*(b+d))

where a is the number of double presence (1-1), b is the number of 1-0,

c

is the number of 0-1 and d is the number of 0,0 (double absence)
p is a+b+c+d

Is there a function to caltulate it using R? I could not understand how

to

use chisq.test function for this.

Thanks in advance.

Antonio Olinto


--

Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] using Pearson's Chi-squared to verify dependence among species distribuion

2013-04-25 Thread Zoltan Botta-Dukat
Dear Antonio,

Try this:

chisq.test(table(sp1,sp2))

Best wishes

Zoltan

2013.04.25. 2:05 keltezéssel, José Hidasi írta:
 Hello Antonio,

 I imagined something like this:

   sp 1   sp 2
 area 1   1  1
 area 2   1  1
 area 3   0  0
 area 4   1  1
 area 5   0  0

 Maybe you could calculate a spearman correlation coefficient. In this
 example, it would be equal to 1. Therefore, there is a sp2 in every area
 there is a sp1.

 Also, I think it is possible to consider Cohen's Kappa or Kendall's W
 coefficients/tests. Moreover, I think Kendall's W results are generally
 similar to Spearman coefficients.

 I don't work with associations, but that is just an idea. Maybe someone
 else can figure out how to do that with the 'chisq.test' function.


 All the best,
 José



 On Wed, Apr 24, 2013 at 6:02 PM, Antonio Silva aolinto@gmail.comwrote:

 Hi,

 I'm trying to use Pearson's Chi-squared to verify the dependence among
 species distribuion.

 I have a dataframe with the presence/absence data of two species in a
 number of sample units

 The equation I'm using is:

 X2= p*(|ad-bc|-p/2)^2 / ((a+b)*(c+d)*(a+c)*(b+d))

 where a is the number of double presence (1-1), b is the number of 1-0, c
 is the number of 0-1 and d is the number of 0,0 (double absence)
 p is a+b+c+d

 Is there a function to caltulate it using R? I could not understand how to
 use chisq.test function for this.

 Thanks in advance.

 Antonio Olinto

  [[alternative HTML version deleted]]

 ___
 R-sig-ecology mailing list
 R-sig-ecology@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-ecology





 ___
 R-sig-ecology mailing list
 R-sig-ecology@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


-- 
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Sampling effort and diversity indices

2013-02-20 Thread Zoltan Botta-Dukat
Dear Magnus,

1. I think there is no diversity index that more appropriate for small 
species richness. If I'm wrong, someone will correct it.

2. You can calculate expected species richness for the same sample size 
(should be equal to or lower than the lowest sample size to avoid 
extrapolation) using rarefaction (see rarefy function in vegan package). 
In fact, it is equal to Hurlbert's diversity whose scaling parameter 
(m=2) is the sample size. Using low scaling parameter values (m=2) may 
also be meaningful. Higher values of m makes the index more sensitive to 
rare species. For m=2 it is equal to the Simpson index. Advantage of 
Hurlbert-diversity is that it has unbiased estimator that consider the 
sample size (I'm not sure that it is used in rarefy function or not).

Best wishes

Zoltan

2013.02.19. 19:25 keltezéssel, Magnus Magnusson írta:
 Hi,

 I need help with a problem since I can't find an exact answer by
 reading/searching the internet.

 I have a dataset with 58 landscapes where  7 species in total may co-occur.
 However, some sites have different sampling efforts. I would like to
 calculate a diversity index value for each landscape so I can sort out
 landscapes with high diversity/poor diversity. The next step is to try to
 explain these diversity differences with e.g. degree of forest
 fragmentation in each landscape.

 So my question is:
 1. Which diversity index would be most appropriate when having only 7
 species to consider?
 2. How do I account for variable sampling effort in my count data when
 calculating a diversity index such as Simson's diversity index in the vegan
 package?

 /Magnus
 PhD-student in Umel', Sweden

   [[alternative HTML version deleted]]



 ___
 R-sig-ecology mailing list
 R-sig-ecology@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


-- 
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] question on gls model interpretation

2013-01-29 Thread Zoltan Botta-Dukat

Dear Iris,

The expected value of any treatment combination can be calculated as sum 
of the coefficients. For example:

E(no comptetitors, no insecticide) = Intercept
E(many competitors, high concentration) =  Intercept + conditionold + 
contaminationhigh + conditionold:contaminationhigh


The non-significant interactions would mean that effects of competition 
and insecticide are simple summed.


You have two interaction parameters that significantly differ from zero. 
For example, conditionold:contaminationhigh=1.2005231. This value can be 
interpreted by two ways. High insecticede concentration has a strong 
negative effect if no competion (contaminationhigh=-1.2825250), but it 
has negligible effect, if competition is stong: 
-1.2825250+1.2005231=-0.0820019. The interaction parameter measures the 
difference between two levels of competition in the effect of insecticide.
Another interpretation is that interaction coefficient measures the 
difference between two levels of insecticide treatment in the effect of 
strong competition (ie. in the decrease of abundance caused by strong 
competition).
From mathematical point of view these two interpretations are 
equivalent. You can choose either.




Best wishes


Zoltan


2013.01.29. 14:54 keltezéssel, Iris Kröger írta:

Dear R-Sig-Ecology,

I'm analysing an experiment about mosquito larvae beeing treated with 3 conditions (no competitors added = algae, few competitors added 
=new, many competitors added =old). After 2 weeks I contaminated all conditions with 3 insecticide concentrations (no 
treatment = control, low concentration =low, medium concentration = medium, high concentration 
=high). The effect of treatments was observed over a time period of 35 days.
Now I would like to analyse, if there is a synergistic effect of condition and 
insecticide treatment. I used a gls model (see below).
(Important: the mosquito larval abundances differed significantly between 
conditions when insecticide contamination was applied. I'm not sure if this is 
a problem for the further analyses)

Obviously there is a synergistic effect (condition * contamination, p0.001), but I 
don't know how to interpret the output. Which treatments did the model compare?Does it 
mean, that the effect of medium and high contamination increased significantly at 
old-condition compared with the effect at algae-condition? (This I can hardly believe. 
Mosquito larval abundances were close to zero even without contamination at 
condition-oldcontamination-control , hence an additional effect of insecticide 
treatment should be hardly detectable. I would rather expect an effect at 
condition-new in combination with contamination...)

I used:
mod1-gls(log10(mosquito+1) ~condition * contamination , data=MK ,
  correlation = corAR1(form=~day |bucket),
  weights=varIdent(form= ~ 1|condition),
  method=REML)
summary(mod1)
anova(mod1)

The output was:


anova(mod5)

Denom. DF: 258
  numDF F-value p-value
(Intercept) 1 221.04772 .0001
condition 2 243.79461 .0001
contamination 3 24.71058 .0001
condition:contamination 6 23.92481 .0001

Coefficients:
  Value Std.Error t-value p-value
(Intercept) 1.9778939 0.1391071 14.218493 0.
conditionnew -0.771 0.1610017 -4.823963 0.
conditionold -1.8958920 0.1461519 -12.972068 0.
contaminationhigh -1.2825250 0.1840214 -6.969433 0.
contaminationlow -0.2044417 0.1840214 -1.110967 0.2676
contaminationmedium -0.7833268 0.1840214 -4.256715 0.
conditionnew:contaminationhigh 0.1011773 0.2129852 0.475044 0.6352
conditionold:contaminationhigh 1.2005231 0.1933408 6.209364 0.
conditionnew:contaminationlow -0.1917487 0.2129852 -0.900291 0.3688
conditionold:contaminationlow 0.1496570 0.1933408 0.774058 0.4396
conditionnew:contaminationmedium -0.1454105 0.2129852 -0.682726 0.4954
conditionold:contaminationmedium 0.7940461 0.1933408 4.106978 0.0001

Can anyone help me?
Many thanks,
Iris

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



--
Botta-Dukát Zoltán

Ökológiai és Botanikai Intézet
Magyar Tudományos Akadémia
Ökológiai Kutatóközpont

2163. Vácrátót, Alkotmány u. 2-4.
tel: +36 28 360122/157
fax: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu


Zoltán BOTTA-Dukát

Institute of Ecology and Botany
Hungarian Academy of Sciences
Centre for Ecological Research

H-2163 Vácrátót, Alkomány u. 2-4.
HUNGARY
Phone: +36 28 360122/157
Fax..: +36 28 360110
botta-dukat.zol...@okologia.mta.hu
www.okologia.mta.hu

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] post hoc in Kruskal Wallis

2011-11-23 Thread Zoltan Botta-Dukat

Dear Jakub,

You could apply the Dunn test, using one_way function in the coin package.

Zoltan

2011.11.23. 19:19 keltezéssel, Johannes Radinger írta:

Hello,

I am not an expert in this at all, but I recently came accross following 
package:
http://cran.r-project.org/web/packages/multcomp/multcomp.pdf

There is the function glht() for e.g multiple comparisons of means. Maybe there
is also a function for non-parametric tasks, but I haven't checked.

/Johannes


Am 23.11.2011 um 18:21 schrieb Jakub Szymkowiak:


Hi,
does anyone know, how can I perform post-hoc tests (especially Least 
Significant Difference and Sheffe Test) for results from Kruskal-Wallis test? 
In KruskaI-Wallis test I found some significant differences between tested 
groups, but I want to know between which groups this difference is really 
signifficant.

Cheers,
Jakub

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Stepwise algorithm for GAM

2011-05-24 Thread Zoltan Botta-Dukat
Hi,

there is no automatic variable selection in the mgcv package. You should 
remove the superfluous terms manually. You can choose them using ML-test 
, comparing AIC values or using plot function.

An example:

set.seed(3)
n-200
## simulate data
dat - gamSim(1,n=n,scale=.15,dist=poisson)
str(dat)
## spurious predictors
dat$x4 - runif(n, 0, 1)
dat$x5 - runif(n, 0, 1)

b1-gam(y~s(x0)+s(x1)+s(x2)+s(x3)+s(x4)+s(x5),data=dat,family=poisson) # 
full model
summary(b1)  # you can choose superfluous predictors based on this output
b2-gam(y~s(x0)+s(x1)+s(x2)+s(x3)+s(x4),data=dat, family=poisson) # 
reduced model without x5
anova(b,b2,test=Chisq) # comparing the two models
plot(b1,pages=1) # smooth function is a nearly horizontal line for 
superfluous predictors

Setting select=T may give more clear pattern, however in my toy-example 
the difference is small.

Best wishes

Zoltan

2011.05.24. 5:21 keltezéssel, ARISTIDES LOPEZ írta:
 Hello all,


 Just a question, I´m trying to fit my model throughout stepwise
 selection.At this point (with the valuable help of Gavin and Ben) my
 model are like
 this:


 model 1-gam(Young (No. ind)~s(Lat, k=6)+s(Long, k=6)+s(Deep, k=6)+s(Area
 (km2),k=6)+as.factor (year),family=poisson,data=L. synagris)


 I have 4 species * 3 groups (young, adult and total) * 5 explanatory
 variables (Lat, Lon, Deep, Area, Year). So I´m looking for a stepwise
 algorithm  that help me to select the best model. I tried with step () in
 the stats package but R give me the following error message:


 Error en glm.control(irls.reg = 0, epsilon = 1e-06, maxit = 100, trace =
 FALSE,  : el argumento(s) no fue utilizado(s) (irls.reg = 0, mgcv.tol =
 1e-07, mgcv.half = 15,...


 Any suggestion?


 Cheers


 Date: Wed, 18 May 2011 10:53:41 -0500
 From: ARISTIDES LOPEZaristides...@gmail.com
 To: r-sig-ecology@r-project.org
 Subject: [R-sig-eco] Error message in GAM
 Message-ID:BANLkTikz-dQ=jv9ykftggeyo5ubwmcu...@mail.gmail.com
 Content-Type: text/plain

 Dear members list,

 I'm trying to make a model for descrive the distribution of demersal fishes
 in the Colombian Caribbean Sea. I have a data set of n= 56, the model is
 like this: Density (ind/km2) ~ s(Lat) + s(Long) + s(deep). The problem is
 that R give me the error message *Model has more coefficients than data*.

 Anybody knows how can avoid this?

 Faithfully.

 --
 Aristides López-Peña



 Date: Wed, 18 May 2011 17:48:04 +0100
 From: Gavin Simpsongavin.simp...@ucl.ac.uk
 To: ARISTIDES LOPEZaristides...@gmail.com
 Cc: r-sig-ecology@r-project.org
 Subject: Re: [R-sig-eco] Error message in GAM
 Message-ID:1305737284.25148.15.ca...@prometheus.geog.ucl.ac.uk
 Content-Type: text/plain; charset=UTF-8

 On Wed, 2011-05-18 at 10:53 -0500, ARISTIDES LOPEZ wrote:
 Dear members list,

 I'm trying to make a model for descrive the distribution of demersal
 fishes
 in the Colombian Caribbean Sea. I have a data set of n= 56, the model is
 like this: Density (ind/km2) ~ s(Lat) + s(Long) + s(deep). The problem is
 that R give me the error message *Model has more coefficients than
 data*.
 Anybody knows how can avoid this?

 Faithfully.
 Each of your smooths will be using k = 10 degrees of freedom so that is
 30 degrees of freedom already, which is a lot for a data set of 56
 observations.

 Are all the data unique? i.e. you have 56 unique density values, 56
 unique lats, 56 unique lons etc. If not, it might be the the unique
 information in the data is not sufficient to support the complexity of
 the smooths.

 My money would be on that you did something you haven't actually told
 us, and have more smooths in the model than you say and they are using
 more degrees of freedom than it appears to us.

 The easy way to try to solve the problem, will be to restrict the
 complexity of the individual smooths:

 response ~ s(Lat, k = 6) + s(Long, k = 6) + s(deep, k = 6)

 for example.

 You could probably model these data as a Possion with an offset term for
 the km2 covered by each sample, rather than treating these as a density.

 HTH,

 G

 --
 %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
   Dr. Gavin Simpson [t] +44 (0)20 7679 0522
   ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
   Pearson Building, [e]
 gavin.simpsonATNOSPAMucl.ac.ukhttp://gavin.simpsonatnospamucl.ac.uk/
   Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/
   UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
 %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




 --

 Message: 9
 Date: Wed, 18 May 2011 17:16:10 -0500
 From: ARISTIDES LOPEZaristides...@gmail.com
 To: r-sig-ecology@r-project.org, gavin.simp...@ucl.ac.uk
 Subject: Re: [R-sig-eco] Error message in GAM
 Message-ID:banlktimuqhnjhdox9lnnddt60gsiwnx...@mail.gmail.com
 Content-Type: text/plain

 Dear Dr. Gavin,

 Thank you very much for your help. All my data are unique (because I have 56
 different 

[R-sig-eco] passive projection of species richness

2011-04-29 Thread Zoltan Botta-Dukat

Dear All,

Can I passively project species richness (or any variables not included 
in the analysis)  into RDA plot made in vegan? I know that there is such 
option in CanoDraw, but I couldn't find it in R.


Thanks

Zoltan

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] cluster analysis using both continuous and discrete variables

2010-12-30 Thread Zoltan Botta-Dukat

Dear Jonathan,

Gower distance could be used for mixed (i.e. continuous and categorical) 
data. You can find function for calculating it in the cluster and vegan 
packages.


Best wishes

Zoltan

2010.12.29. 20:53 keltezéssel, Jonathan Hughes írta:


Hello,

I need to do a cluster analysis with a dataset that includes both continuous 
and discrete variables. I can't get around the problem of computing a 
meaningful distance matrix with such a dataset. I was wondering if any of you 
guys has dealt with this issue and what kind of function you found useful.

Thanks!

Jonathan

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] Quantifying functional trait diversity through Gower distance and pcoa

2010-11-16 Thread Zoltan Botta-Dukat

Dear Chris,

I'm not sure that You really have to create continuous traits by PCoA. 
You can simply calculate functional diversity from the distance matrix. 
If you have abundance data, I suggest calculating Rao's quadratic 
entropy (it is implemented for example in FD and ade4 packages). If only 
presence/absence data are available, you could find indices in Schmera 
et al. (2009).


Using PCoA is needed only if you want to apply detailed analysis 
proposed by Villéger et al. 2008. However, before do it, I suggest 
reading Podani's comments (Podani 2009).


Best wishes

Zoltan



Podani, J. 2009. Convex hulls, habitat filtering, and functional 
diversity: mathematical elegance versus ecological interpretability. 
Community Ecology 10(2): 244-250.


Schmera, D., T. Erős and J. Podani. 2009. A measure for assessing 
functional diversity in ecological communities. Aquatic Ecol. 43: 
157-167. DOI 10.1007/s10452-007-9152-9



2010.11.16. 16:08 keltezéssel, chris mcowen írta:

Dear List,

I am relatively new to this area of ecology and R, coming from a
phylogenetic background. I am looking to quantify functional trait
diversity in in order to plot global functional trait diversity
hotspots. My trait data are categorical and all indicies of functional
diversity require continuous data.

My approach was to generate a distance matrix based on the Gower
method - i have done this with vegdist- and then i was planning on
running a pcoa on these to generate the continuous data to use in the
calculation of functional diversity indicies.

I have two questions:-

First, does this make sense, i appreciate i will loose information this way.

Second, I have looked at vegan but can not see a way to run a pcoa on
the output from a vegdist analysis, is this possible and once again
does this make sense?

Any help would be greatly appreciated,

Chris

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] explained variation in GAM/GAMM

2010-03-08 Thread Zoltan Botta-Dukat

Dear All,

I would like to estimate the variation explained by different sets of 
predictors. My response is binary, and I want to capture the possible 
non-linear relationships, thus first I chooose GAM with binomial family.
Summary of the model gives adjusted R-squared and explained deviance (in 
%). The latter seems to be what I need, and I'm not sure what  the 
R-squared is in this situation. Could someone explain it?


Then, I recognzed that residuals are highly spatially autocorrelated, so 
I changed to GAMM. It handle the spatial autocorrelation, but the 
summary of gam part of the fitted model gives adjusted R-squared only, 
but not the expalined variance. R-squared is lower in GAMM than in GAM, 
so I think  considering spatial autocorrelation is necessary. My 
question is whether I can use this adjusted R-squared or I should 
calculate something else, for example Efron's pseudo-R-squared, from the 
predicted values.


Thanks for your advice

Zoltan

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] mixed effect model: compare seed families

2010-01-18 Thread Zoltan Botta-Dukat

Hi everyone,

I'm struggling with evaluation an experiment for maternal effect and 
plasticity.


We have grown offsprings of 64 individuals (seed families) in a common 
garden experiment. There was 8 replicate plots, in each plot one 
individual from each seed family.
Seeds come from 8 different sites, and 8 seed families collected in each 
site. Sites belong to two groups according to soil type: sand and clay. 
In each site 4 large and 4 small mother plant were chosen.


We would like to test:
- difference between soil types
- difference between mother size categories
- interaction between soil type and mother size
- difference between sites within a soil type (In fact we are interested 
in differences between sites in sand only, because the common garden was 
on sand, and one site is situated in its neighbour).


It is clear that soil_type and mother_size are fix factors.
I suspect that both plot and seed_family should be random factor, but 
I'm not sure what is the correct specification. Maybe 
random=~1|plot/seed_family. It's OK?
Can I include the comparison between sites into this model? Or would be 
better to make a separate analysis using seed families from sand only?


Thanks for the suggestions

Zoltan

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology