[R-sig-eco] Unbalanced data and random effects

2013-10-17 Thread v_coudrain
Thank you very much for these explanations. It is quite technical and I am not 
sure that I got it all, but I will try to find the book of GelmanHill to get 
more insight into 
shrinkage. I read the book of Zuur and as you said the topic is not extensively 
covered.

___
Les prévisions météo pour aujourd'hui, demain et jusqu'à 8 jours ! Voila.fr 
http://meteo.voila.fr/

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


[R-sig-eco] Unbalanced data and random effects

2013-10-16 Thread v_coudrain
Dear all,

I performed a census of insects at different sites and measured there size. I 
would like to know if size is related to an environmental factor. I modelled 
the size as a 
fonction of the factor with site as a random variable to account for 
within-site variability. However I have strong unbalanced data with some sites 
having only two 
individuals and others up to 100. Is having site as a random factor sufficient 
to deal with this strong data unbalance? The residual fit of the data is quite 
bad, 
certainly because of the strong difference in variance among sites. Would 
anybody have some advice? Thank you!
___
Les prévisions météo pour aujourd'hui, demain et jusqu'à 8 jours ! Voila.fr 
http://meteo.voila.fr/

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


[R-sig-eco] null model for testing nestedness

2013-09-25 Thread v_coudrain
Thank you very much. Yes it is working with oecosimu, exept that it does not 
seem to work for weighted data. There is the possibility to specify weighted = 
TRUE: 

oecosimu(matrix,nestednodf, method = quasiswap, nsimul = 999, order = FALSE, 
weighted =TRUE)

However, I get only null values and p=1. For weighted = F, I get good values.

Best wishes
___
Quiz TV : Vous êtes fan de la série Friends ? 5 questions ici 
http://tv.voila.fr/quiz/quiz-special-friends_14538959.html

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


[R-sig-eco] null model for testing nestedness

2013-09-25 Thread v_coudrain
Dear Jari,

Thank you very much for this clear answer. I did not get that quasiswap only 
concerned binary data. After reading your explanations, I think I'll stay to 
binary 
data and avoid the issue of weighted ones, which are much less straightforward 
to interpret. Anyway, I will have a look at the development versions.

Best wishes,
Valérie


 Message du 25/09/13 à 15h45
 De : Jari Oksanen 
 A :  
 Copie à :  
 Objet : Re: [R-sig-eco] null model for testing nestedness
 
 Valerie,
 
 There are at least two problems here: the way you call oecosimu() and how 
 nestdnodf(..., weighted =TRUE) works with binary data. 
 
 If you specify a *binary* null model as method, then you will get binary 
 data. Even if you supplied quantitative data, they are transformed into 1/0 
(presence/absence) data. You specified method = quasiswap, and that is binary 
model. Another problem is that nestednodf(..., weighted = TRUE) seems to 
evaluate the statistics all as zeros if you request weighted (= quantitative 
data) analysis of non-quantitative data (binary). It cannot perform weighted 
analysis if 
there are no weights, but still I think it should return something else than 
zeros. We'll have a look at that issue. 
 
 You should specify a non-binary null model if you want to have a non-binary 
 (weighted) analysis. Quantitative null models are problematic, and vegan 
 release 
version does not have much choice here. I think r2dtable may be the only one. 
Development version of vegan in http://www.r-forge.r-project.org/ has a wider 
gamme of non-binary null models, but I think you need to be brave to use 
quantitative null models. They are something for people who are not afraid of 
going to 
areas where angels fear to tread.
 
 FWIW, weighted nestednodf seems to work in oecosimu if you ask for a 
 quantitative nullmodel (r2dtable in my tests) both with the release version 
 (2.0-8 or 
2.0-9) and with the development version (2.1-35 or 2.1-36). But you really need 
to to specify a quantitative null model. Both null models and oecosimu are 
completely re-written and re-designed in development versions.
 
 Cheers, Jari Oksanen
 
 On 25/09/2013, at 15:56 PM, 
 wrote:
 
  Thank you very much. Yes it is working with oecosimu, exept that it does 
  not seem to work for weighted data. There is the possibility to specify 
  weighted = 
TRUE: 
  
  oecosimu(matrix,nestednodf, method = quasiswap, nsimul = 999, order = 
  FALSE, weighted =TRUE)
  
  However, I get only null values and p=1. For weighted = F, I get good 
  values.
  
  Best wishes
  ___
  Quiz TV : Vous êtes fan de la série Friends ? 5 questions ici 
  http://tv.voila.fr/quiz/quiz-special-friends_14538959.html
  
  ___
  R-sig-ecology mailing list
  R-sig-ecology@r-project.org
  https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
 
 
___
Quiz TV : Vous êtes fan de la série Friends ? 5 questions ici 
http://tv.voila.fr/quiz/quiz-special-friends_14538959.html

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


[R-sig-eco] null model for testing nestedness

2013-09-24 Thread v_coudrain
Dear all, 
I would like to implement a null model to test if nestedness of a matrix 
departs from chance. There is an example in package bipartite with the 
function nullmodel:

obs - unlist(networklevel(web, index=weighted NODF))
nulls - nullmodel(web, N=100, method=1)
null - unlist(sapply(nulls , networklevel, index=weighted NODF))

This works well, however, I have the impress that prior to apply the function 
networklevel, the initial matrix is being reordered to achieve maximal 
packing. 
However, I don't want my matrix to be reordered, but I did not manage to find 
how to specify it. In the package vegan, there is the function nestednodf with 
the 
option order=FALSE, but I could not implement a null model based on this 
function (because the output contain multiple attributes).

Any help welcomed


___
Quiz TV : Vous êtes fan de la série Friends ? 5 questions ici 
http://tv.voila.fr/quiz/quiz-special-friends_14538959.html

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


[R-sig-eco] dispersion parameter in binomial model

2013-02-27 Thread v_coudrain
Dear all,
I computed a binomial model with a proportion as response variable using 
glm(cbind(realized, not realized)~x,family=binomial). The output tells me 
that the 
dispersion parameter taken is 1. For comparison I computed the same model using 
family=quasibinomial and I get a dispersion parameter of 0.5. The resultats 
are 
very different between the two models and in regard to the plotted data, the 
quasibinomial model seems to be more accurate. I am a bit confused about how to 
know 
if my data are accurately fitted by a binomial model or if they are under- or 
overdispersed and I'd rather use the binomial or another fitting model. 
I found this formula to calculate the dispersion parameter, but I am not sure 
if it is accurate for a binomial model:

phi=sum(((realized/(realized+not 
realized))-model$fitted)^2/model$fitted)/model$df.residual

With this formula I get for both the binomial and the quasibinomial model a 
phi=0.4. Is this a sign of underdispersion?

Thank you!
___
Qu'y a-t-il ce soir à la télé ? D'un coup d'œil, visualisez le programme sur 
Voila.fr http://tv.voila.fr/programmes/chaines-tnt/ce-soir.html

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


[R-sig-eco] adonis and temporal changes

2013-02-18 Thread v_coudrain
Dear all, 
I would like to test changes in species dissimilarity matrices over time, 
taking into account that the measurement are repeated in each site over years. 
I used the 
adonis function: adonis(diss.matrix~year, strata=site). However if I do the 
same model entering site as an additional fixed effect (this was applied this 
way in a 
paperI read): adonis(diss.matrix~site+year, strata=site), I get exactly the 
same estimate for year, but the variance explained is much higher. I am a bit 
lost regarding 
how much of the variance in dissimilarity is really explained by temporal 
changes. 
Thank you very much
___
C'est l'année du Serpent ! Connaissez-vous votre signe astral chinois ? 
Découvrez-le ici 
http://astrocenter.voila.fr/voila/Presentation.aspx?product=StEdCH2K2Af=-3000

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


[R-sig-eco] (no subject)

2013-02-18 Thread v_coudrain
Thank you for these explanations. If I put strata=site, this means that for 
each site my dissimilarity matrix of year 1 and year 2 will be permuted and the 
observed 
changes compared to these random permutation? Adding site as a fixed factor 
then ensure that I am testing changes in time site by site. Am I correct?

To my design:
I have 30 permanent sites, 10 of each category of isolation (Isolation = factor 
with 3 levels: 3x10 sites = 30 sites). I conducted the samples in three years 
in each 
site. I have thus 1 sampling (species composition) pro site pro year. I would 
like to know how the sampled communities change with time, either on a site 
basis, 
or at the level of isolation (I may compare multi-site dissimilarity among 
isolation levels between years). 
I am not really interested in knowing what proportion of differences in species 
community is due to space vs time, but I would like to really focus on the 
temporal 
changes. That's why I think putting site as a fixed effect should be 
appropriate. But if you have any suggestion or think this is not correct, I 
would be pleased to 
have your opinion.
Cheers,

Valerie





On 18/02/2013, at 14:04 PM, Pierre THIRIET wrote:

 Dear Valérie,
 
 If I remember well, your design includes:
 Isolation categories: 3 levels
 Sites: nested within Isolation categories (10 levels, a total of 30 sites)
 How many replicates per site and time?
 Time:? how many years you have? Only one sampling per year? Within sites and 
 years, samples were random or it is always exactly the same area you 
sample (e.g. permanent quadrats)?
 
 for adonis, consider that strata is for constraining permutations, which is 
 different than terms in the formulae.
 
Exactly. The 'strata' only influence the permutations and have no effect in 
formula nor effect defined in the formula.

Currently the 'strata' are the only way to constrain the permutations. However, 
in the R-Forge version of vegan and in vegan 2.2-0 (to be released in April) 
you 
can give a permutation matrix as an input to adonis. You can generate the 
permutation matrix with, say, shuffleSet function of the permute package. This 
allows 
generation of restricted permutations for instance for time series. Vegan 
command vegandocs(permutations) will open up the vignette of the permute 
package 
for your inspection, and this will give some examples of defining restricted 
permutations. At some timeframe we are completely moving to the permute 
package, 
but you can already use its permutation matrices as input with these new and 
upcoming versions of vegan from R-Forge.

Cheers, Jari
--
Jari Oksanen, Dept Biology, Univ Oulu, 90014 Finland
___
C'est l'année du Serpent ! Connaissez-vous votre signe astral chinois ? 
Découvrez-le ici 
http://astrocenter.voila.fr/voila/Presentation.aspx?product=StEdCH2K2Af=-3000

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


[R-sig-eco] adonis and temporal changes

2013-02-18 Thread v_coudrain
Thank you for these explanations. If I put strata=site, this means that for 
each site my dissimilarity matrix of year 1 and year 2 will be permuted and the 
observed 
changes compared to these random permutation? Adding site as a fixed factor 
then ensure that I am testing changes in time site by site. Am I correct?

To my design:
I have 30 permanent sites, 10 of each category of isolation (Isolation = factor 
with 3 levels: 3x10 sites = 30 sites). I conducted the samples in three years 
in each 
site. I have thus 1 sampling (species composition) pro site pro year. I would 
like to know how the sampled communities change with time, either on a site 
basis, 
or at the level of isolation (I may compare multi-site dissimilarity among 
isolation levels between years). 
I am not really interested in knowing what proportion of differences in species 
community is due to space vs time, but I would like to really focus on the 
temporal 
changes. That's why I think putting site as a fixed effect should be 
appropriate. But if you have any suggestion or think this is not correct, I 
would be pleased to 
have your opinion.
Cheers,

Valerie





On 18/02/2013, at 14:04 PM, Pierre THIRIET wrote:

 Dear Valérie,
 
 If I remember well, your design includes:
 Isolation categories: 3 levels
 Sites: nested within Isolation categories (10 levels, a total of 30 sites)
 How many replicates per site and time?
 Time:? how many years you have? Only one sampling per year? Within sites and 
 years, samples were random or it is always exactly the same area you 
sample (e.g. permanent quadrats)?
 
 for adonis, consider that strata is for constraining permutations, which is 
 different than terms in the formulae.
 
Exactly. The 'strata' only influence the permutations and have no effect in 
formula nor effect defined in the formula.

Currently the 'strata' are the only way to constrain the permutations. However, 
in the R-Forge version of vegan and in vegan 2.2-0 (to be released in April) 
you 
can give a permutation matrix as an input to adonis. You can generate the 
permutation matrix with, say, shuffleSet function of the permute package. This 
allows 
generation of restricted permutations for instance for time series. Vegan 
command vegandocs(permutations) will open up the vignette of the permute 
package 
for your inspection, and this will give some examples of defining restricted 
permutations. At some timeframe we are completely moving to the permute 
package, 
but you can already use its permutation matrices as input with these new and 
upcoming versions of vegan from R-Forge.

Cheers, Jari
--
Jari Oksanen, Dept Biology, Univ Oulu, 90014 Finland
___
C'est l'année du Serpent ! Connaissez-vous votre signe astral chinois ? 
Découvrez-le ici http://astrocenter.voila.fr/voila/Presentation.aspx?
product=StEdCH2K2Af=-3000
___
C'est l'année du Serpent ! Connaissez-vous votre signe astral chinois ? 
Découvrez-le ici 
http://astrocenter.voila.fr/voila/Presentation.aspx?product=StEdCH2K2Af=-3000

___
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 and temporal changes

2013-02-18 Thread v_coudrain
Dear Steve,

Thank you very much. I do not exactly understand why the test for isolation 
will be wrong, would you have some some explanation? 
In a linear regression, you cannot assess the effect of single variable if the 
interaction (in which your variable is part) is significant. So if I get a 
significant result 
for the isolation*year effect I should conclude that there is an interaction 
between isolation and year. If the interaction is not significant, should I 
drop it to get the 
correct estimate for the year effect?
I would have an additional question: I have also an environemental gradient 
(continuous, one value pro site, constant over the years). Is it possible to 
include it?

Best wishes
Valerie


 Message du 18/02/13 à 15h41
 De : Steve Brewer 
 A : v_coudr...@voila.fr, r-sig-ecology@r-project.org
 Copie à : 
 Objet : Re: [R-sig-eco] adonis and temporal changes
 
 Valerie,
 
 Adonis does not define fixed or random effects, and you therefore cannot
 define multiple error terms. However, if your model statement looks
 something like this - isolation*year + site, strata = site - then you will
 get the correct test for the isolation x year interaction and the correct
 test for the year effect. The test for isolation will be wrong, because
 the residual error is used to test all effects, when it is only
 appropriate for testing the year effect and the year * isolation
 interaction. The isolation between-subjects effect should be tested with
 the site effect but is not.
 
 The key point is here to make strata = site and to NOT specify the site-
 interactions with isolation or year. In this way, site will be treated as
 a block for the within-subjects effects and thus could be considered a
 random effect.
 
 Hope this helps.
 
 
 J. Stephen Brewer 
 Professor 
 Department of Biology
 PO Box 1848
 University of Mississippi
 University, Mississippi 38677-1848
 Brewer web page - http://home.olemiss.edu/~jbrewer/
 FAX - 662-915-5144
 Phone - 662-915-1077
 
 
 
 
 On 2/18/13 8:19 AM, v_coudr...@voila.fr  wrote:
 
 Thank you for these explanations. If I put strata=site, this means that
 for each site my dissimilarity matrix of year 1 and year 2 will be
 permuted and the observed
 changes compared to these random permutation? Adding site as a fixed
 factor then ensure that I am testing changes in time site by site. Am I
 correct?
 
 To my design:
 I have 30 permanent sites, 10 of each category of isolation (Isolation =
 factor with 3 levels: 3x10 sites = 30 sites). I conducted the samples in
 three years in each
 site. I have thus 1 sampling (species composition) pro site pro year. I
 would like to know how the sampled communities change with time, either
 on a site basis, 
 or at the level of isolation (I may compare multi-site dissimilarity
 among isolation levels between years).
 I am not really interested in knowing what proportion of differences in
 species community is due to space vs time, but I would like to really
 focus on the temporal
 changes. That's why I think putting site as a fixed effect should be
 appropriate. But if you have any suggestion or think this is not correct,
 I would be pleased to
 have your opinion.
 Cheers,
 
 Valerie
 
 
 
 
 
 On 18/02/2013, at 14:04 PM, Pierre THIRIET wrote:
 
  Dear Valérie,
  
  If I remember well, your design includes:
  Isolation categories: 3 levels
  Sites: nested within Isolation categories (10 levels, a total of 30
 sites)
  How many replicates per site and time?
  Time:? how many years you have? Only one sampling per year? Within
 sites and years, samples were random or it is always exactly the same
 area you 
 sample (e.g. permanent quadrats)?
  
  for adonis, consider that strata is for constraining permutations,
 which is different than terms in the formulae.
  
 Exactly. The 'strata' only influence the permutations and have no effect
 in formula nor effect defined in the formula.
 
 Currently the 'strata' are the only way to constrain the permutations.
 However, in the R-Forge version of vegan and in vegan 2.2-0 (to be
 released in April) you
 can give a permutation matrix as an input to adonis. You can generate the
 permutation matrix with, say, shuffleSet function of the permute package.
 This allows 
 generation of restricted permutations for instance for time series. Vegan
 command vegandocs(permutations) will open up the vignette of the
 permute package 
 for your inspection, and this will give some examples of defining
 restricted permutations. At some timeframe we are completely moving to
 the permute package,
 but you can already use its permutation matrices as input with these new
 and upcoming versions of vegan from R-Forge.
 
 Cheers, Jari
 --
 Jari Oksanen, Dept Biology, Univ Oulu, 90014 Finland
 ___
 C'est l'année du Serpent ! Connaissez-vous votre signe astral chinois ?
 Découvrez-le ici http://astrocenter.voila.fr/voila/Presentation.aspx?
 product=StEdCH2K2Af=-3000
 

Re: [R-sig-eco] adonis and temporal changes

2013-02-18 Thread v_coudrain
Thank you very much for your explanations. I still would have a question about 
the proportion explained. I got for example an R2 of 0.11 for years*isolation 
and 
0.46 for site. Does this mean that most of the variation in species composition 
is between sites and within site variation (also from one year to the other) is 
relatively small? And what about the 40% unexplained...I do not well see where 
variation can be if it is neither between nor within sites. 

Many thanks
Best,

Valerie


 Message du 18/02/13 à 21h49
 De : Steve Brewer 
 A : v_coudr...@voila.fr, r-sig-ecology@r-project.org
 Copie à : 
 Objet : Re: [R-sig-eco] adonis and temporal changes
 
 Valerie,
 
 If I understand your design correctly, you're doing a repeated measures
 analysis, in which isolation is a between-subjects (I.e., between-sites)
 effect. Year and the year x isolation interaction are within-subjects
 effects. Because repeated measurements on composition are being taken on
 the same site in three years, you use strata to restrict the permutation
 within each site as if site were were a random block containing the
 different years of measurement. Accordingly, there should be two error
 terms: site(isolation) to test the isolation main effect, and the
 site*year(isolation), which in this case is equivalent to the residual
 error, which is the appropriate error term for testing the year effect and
 the year x isolation interaction. The test for isolation is wrong because
 adonis cannot use more than one error term to test effect and thus is
 using the residual error to test all effects. It should use the
 site(isolation) term to test the isolation effect, but it does not. Using
 the residual error to test the isolation effect amounts to
 pseudoreplication. It assumes that the three measurements of composition
 in different years on the same site are independent observations. They are
 not. Often, however, people are not interested in the between-subjects
 effects (in this case, the main effect of isolation). Rather they are
 interested in the interaction with time (in this case, isolation x year).
 
 I don't see that you are justified in pooling any term with the error term
 just because it is not significant. Again, the problem is
 pseudoreplication. You're treating correlated observations as if they were
 independent observations. Pooling the isolation x year interaction with
 the residual error term artificially inflates your error df even more.
 
 I'm afraid I don't know R well enough to explain how to analyze the
 covariate. 
 
 
 J. Stephen Brewer 
 Professor 
 Department of Biology
 PO Box 1848
 University of Mississippi
 University, Mississippi 38677-1848
 Brewer web page - http://home.olemiss.edu/~jbrewer/
 FAX - 662-915-5144
 Phone - 662-915-1077
 
 
 
 
 On 2/18/13 1:49 PM, v_coudr...@voila.fr  wrote:
 
 Dear Steve,
 
 Thank you very much. I do not exactly understand why the test for
 isolation will be wrong, would you have some some explanation?
 In a linear regression, you cannot assess the effect of single variable
 if the interaction (in which your variable is part) is significant. So if
 I get a significant result
 for the isolation*year effect I should conclude that there is an
 interaction between isolation and year. If the interaction is not
 significant, should I drop it to get the
 correct estimate for the year effect?
 I would have an additional question: I have also an environemental
 gradient (continuous, one value pro site, constant over the years). Is it
 possible to include it?
 
 Best wishes
 Valerie
 
 
  Message du 18/02/13 à 15h41
  De : Steve Brewer
  A : v_coudr...@voila.fr, r-sig-ecology@r-project.org
  Copie à : 
  Objet : Re: [R-sig-eco] adonis and temporal changes
  
  Valerie,
  
  Adonis does not define fixed or random effects, and you therefore cannot
  define multiple error terms. However, if your model statement looks
  something like this - isolation*year + site, strata = site - then you
 will
  get the correct test for the isolation x year interaction and the
 correct
  test for the year effect. The test for isolation will be wrong, because
  the residual error is used to test all effects, when it is only
  appropriate for testing the year effect and the year * isolation
  interaction. The isolation between-subjects effect should be tested with
  the site effect but is not.
  
  The key point is here to make strata = site and to NOT specify the site-
  interactions with isolation or year. In this way, site will be treated
 as
  a block for the within-subjects effects and thus could be considered a
  random effect.
  
  Hope this helps.
  
  
  J. Stephen Brewer
  Professor 
  Department of Biology
  PO Box 1848
  University of Mississippi
  University, Mississippi 38677-1848
  Brewer web page - http://home.olemiss.edu/~jbrewer/
  FAX - 662-915-5144
  Phone - 662-915-1077
  
  
  
  
  On 2/18/13 8:19 AM, v_coudr...@voila.fr wrote:
  
  Thank you for these explanations. If I put 

[R-sig-eco] binomial regression with non integers

2013-02-16 Thread v_coudrain
Dear Pierre,

Thank you very much for your answer. In fact I would like to make two different 
analyses: one spatial and one temporal. For the spatial analysis, I will 
compute the 
dissimilarities in the way you suggested it, using beta.pair and dbRDA. For 
temporal analysis of beta diversity between sites, Baselga proposed to use the 
function 
beta.temp that produces for each site a value for beta1, beta2 and betaTotal. I 
have 30 sites, 10 of factor level 1, 10 of factor level 2 and 10 of factor 
level 3. I 
thought that the best way to look at the relationships between the factor and 
the components of beta diversity was to make a logistic regression as mentioned 
earlier: glm(cbind(beta1,beta2)~x,family=quasibinomial). However since beta1 
and beta2 are non-integers I am not sure about being allowed to use binomial 
regression. I would like to mention as well that using family=binomial I get 
a warning about non-integer values, whereas by using family=quasibinomial no 
such 
warning appears. My model being not overdispersed, there would be no 
justification of using a quasi-model. But maybe somebody may have some more 
information 
about this.
Thank you

Valérie
___
C'est l'année du Serpent ! Connaissez-vous votre signe astral chinois ? 
Découvrez-le ici 
http://astrocenter.voila.fr/voila/Presentation.aspx?product=StEdCH2K2Af=-3000

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


[R-sig-eco] binomial regression with non integers

2013-02-15 Thread v_coudrain
Dear all,

I am investigating diversity in different sites. I partitioned my measure of 
diversity into to additive components (Baselga 2012) and get for each site a 
value of overal 
diversity change (between 0 and 1) and a value for each additive component, 
such that for each site beta1+beta2=beta_total. I would like to make a 
regression 
model to test if the proportion of diversity due to beta1 (beta1/beta_total) is 
signifcantly different according to an explanatory factor. If beta1 had been an 
integer 
value, I would have used a binomial model. However, since beta1 is not an 
integer I don't think that I am allowed to use the formel 
glm(cbind(beta1,beta2)~x,family=binomial)? What alternative method could I use?
I hope that my question is not too confuse. 
Thank you very much.
Valérie
___
C'est l'année du Serpent ! Connaissez-vous votre signe astral chinois ? 
Découvrez-le ici 
http://astrocenter.voila.fr/voila/Presentation.aspx?product=StEdCH2K2Af=-3000

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


Re: [R-sig-eco] proportion data with many zeros

2013-02-04 Thread v_coudrain
Thank you very much for clarifying this point. My algorithm is certainly pretty 
bad because as you say I am basically looking at zeros. One point I don't 
really 
understand is that for a pollen type I have a lot of pollen collected at date 
1, some at time 2, few at time 3 and not at all at time 4. I get a significant 
difference 
between time 1 and 2 but no significance between 1 and 3 or 1 and 4. That is 
illogical...maybe is it anyway a problem of the residuals because the residuals 
are 
pretty well balanced for time points with fitted values 0, but for time points 
with no pollen collected there is no variance at all. Well I think that if I 
had a very large 
number of data such that the non-zero part of my data would look nicely 
continuous I could use some zero-inflated models, but with only 4 points in 
time and a 
positive part of the model which does not fit well a continuous distribution it 
is difficult. I'd certainly better take a descriptive way of presenting my data 
for 
sparse pollen types.

Best wishes
Valérie


 Message du 04/02/13 à 13h15
 De : Liz Pryde 
 A : v_coudr...@voila.fr 
 Copie à : 
 Objet : Re: [R-sig-eco] proportion data with many zeros
 
 Hi,
 If you're using a categorical predictor those QQ plots Etc are pretty 
 useless. Just do a residuals vs fits plots and make sure the residuals look 
 Randomly 
scattered.
 
 Is the problem with the smaller pollen types just that they're very low 
 across all time scales? The algorithm won't fit b/c you're basically looking 
 at zero data - or 
a vector of zeroes. So you can assume that this is sig diff from the abundant 
types. This is to do with the way ML estimation works - it's a bit complicated. 
 Some people suggest using bayes methods for this ( it works well) but its 
 way too over-complicated for what you're trying to answer.
 
 The mean variance relationship is specified by the 'family' part if the GLM 
 formula. It is essentially the error structure if your data.
 Liz
 
 
 On 04/02/2013, at 7:55 PM, v_coudr...@voila.fr wrote:
 
  I tried to use tweedie and it again worked very well for the most abundant 
  pollen types and when trying to fit the less abundant ones I got the error: 
  glm.fit: 
  algorithm did not converge.
  I have the impress that it is hopeless to try fitting a model...But anyway 
  thank you very much for making me aware of tweedie. I still should go a bit 
  more into 
the 
  theorical background. I just wonder about the residuals. For the pollen 
  types that can be modelled, the QQ-plots don't look very nice, but the 
  residuals are 
relatively 
  well homogeneously distributed. It is difficult to judge how good the fit 
  is, but the results make sense in regard to the raw data.
  
  Valérie
  ___
  CAN 2013 : résultats et matchs en direct à suivre sur Voila.fr 
  http://sports.voila.fr/football/can/
 

___
CAN 2013 : résultats et matchs en direct à suivre sur Voila.fr 
http://sports.voila.fr/football/can/

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


[R-sig-eco] adonis and negative F-values

2013-02-03 Thread v_coudrain
Dear all,
I used adonis to perform a test of the pairwise site dissimilarity indices 
proposed by Baselga (2010, 2012) in the package betapart. I am concerned about 
my results 
because I get some negative F-values. I read in another post that this may 
happen because of the presence of negative eigenvalues. However I was wondering 
if 
this does invalidate the results, or if they are still interpretable in some 
way. Moreover in case the results are still valid, do you think that providing 
a result table 
containing negative F-values will be considered for publication or be an 
argument of refusal? I may use distance-based RDA with the cailliez correction 
instead, 
would it be a good alternative to adonis for testing the effect of a 
three-level factor on the dissimilarity measures?

Best wishes,
Valerie Coudrain
___
CAN 2013 : résultats et matchs en direct à suivre sur Voila.fr 
http://sports.voila.fr/football/can/

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


Re: [R-sig-eco] proportion data with many zeros

2013-02-03 Thread v_coudrain
Thank you Liz, 
I don't know tweedie, I'll have a look at it, but I have indeed some high 
values. I know about the problems linked to the arcsine transformation. I won't 
consider it 
anyway. I'd like to use either the raw values of pollen grain counts or a 
logistic quasibinomial model. 
Best,
Valérie


 Message du 02/02/13 à 20h47
 De : Liz Pryde 
 A : v_coudr...@voila.fr 
 Copie à : Cade Brian , r-sig-ecology@r-project.org 
 Objet : Re: [R-sig-eco] proportion data with many zeros
 
 Have you plotted the raw data to have a look at the distribution?
 You could try another exponential family distribution like tweedie that has a 
 mass at zero but is otherwise similar to poisson/gamma - so you're directly 
modeling the zeroes. It won't work if you have a lot of high values though. 
 Proportions are tricky. Have a read of the Warton paper (2012/11?) the 
 arcsine is asinine.
 
 Liz
 
 
 
 On 02/02/2013, at 6:34 PM, v_coudr...@voila.fr wrote:
 
  Thank you very much for this suggestion. In fact I reconsidered my question 
  and I am not sure that zero-inflated model is what I need. If I understood 
  it 
properly, 
  a zero-inflated model is best suited when we don't know if zero values are 
  true or false absences (right?). In my case all zero values are assumed to 
  be real 
  absence and are therefore informative. However, fitting quasipoisson on raw 
  counts or quasibinomial on proportion gives me awful distributions of 
  residuals 
and 
  meaningless results. 
  
  Valérie
  
  
  Message du 01/02/13 à 17h22
  De : Cade, Brian 
  A : v_coudr...@voila.fr
  Copie à : r-sig-ecology@r-project.org
  Objet : Re: [R-sig-eco] proportion data with many zeros
  
  For a fully parametric approach, you might want to use of zero-inflated
  beta distribution (e.g., as available in gamlss package), which is designed
  for zero-inflated proportions. Or for a semi-parametric approach, you
  could estimated a sequence of quantile regression estimates (e.g., in
  package quantreg), where some interval (hopefully not to large) of the
  quantiles will be uninformative because they are massed at the zero values.
  
  Brian
  
  Brian S. Cade, PhD
  
  U. S. Geological Survey
  Fort Collins Science Center
  2150 Centre Ave., Bldg. C
  Fort Collins, CO 80526-8818
  
  email: brian_c...@usgs.gov
  tel: 970 226-9326
  
  
  
  On Fri, Feb 1, 2013 at 1:30 AM, wrote:
  
  Dear all, I am trying to test how the proportion of pollen of different
  plants found in the brood cells of a wild bee changes over time. I
  conducted 4 sampling sessions
  (thus time is a factor with 4 levels) and collected several pollen samples
  for each time point (300 pollen grains counted for each sample). I thought
  about applying a
  quasi-binomial glm:
  
  y = cbind(total pollen - pollen of plant X, pollen of plant X)
  
  glm(y~time, family=quasibinomial)
  
  The problem is that I have a lot of zero value, because the pollen of some
  plants only occurred rarely or very clumped in time. I thought about
  applying a zero-inflated
  model, but I have never used it and I am not sure if it is suitable for
  proportion data. Additionally I wondered if I have to consider the fact
  that I don't have the same
  number of pollen sample for each date, which makes my design unbalanced.
  Thank you in advance for advice.
  
  Best wishes
  Valérie
  ___
  CAN 2013 : résultats et matchs en direct à suivre sur Voila.fr
  http://sports.voila.fr/football/can/
  
  ___
  R-sig-ecology mailing list
  R-sig-ecology@r-project.org
  https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
  
  ___
  CAN 2013 : résultats et matchs en direct à suivre sur Voila.fr 
  http://sports.voila.fr/football/can/
  
  ___
  R-sig-ecology mailing list
  R-sig-ecology@r-project.org
  https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
 

___
CAN 2013 : résultats et matchs en direct à suivre sur Voila.fr 
http://sports.voila.fr/football/can/

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


[R-sig-eco] proportion data with many zeros

2013-02-01 Thread v_coudrain
Dear all, I am trying to test how the proportion of pollen of different plants 
found in the brood cells of a wild bee changes over time. I conducted 4 
sampling sessions 
(thus time is a factor with 4 levels) and collected several pollen samples for 
each time point (300 pollen grains counted for each sample). I thought about 
applying a 
quasi-binomial glm: 

y = cbind(total pollen - pollen of plant X, pollen of plant X)

glm(y~time, family=quasibinomial)

The problem is that I have a lot of zero value, because the pollen of some 
plants only occurred rarely or very clumped in time. I thought about applying a 
zero-inflated 
model, but I have never used it and I am not sure if it is suitable for 
proportion data. Additionally I wondered if I have to consider the fact that I 
don't have the same 
number of pollen sample for each date, which makes my design unbalanced. 
Thank you in advance for advice. 

Best wishes
Valérie
___
CAN 2013 : résultats et matchs en direct à suivre sur Voila.fr 
http://sports.voila.fr/football/can/

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


Re: [R-sig-eco] Difference between mantel test and adonis

2013-01-16 Thread v_coudrain
Thank you very much for your explanations. So if I understood it correctly, a 
significant outcome from adonis() (or capscale()) should indicate me that my 
species community changes along the gradient? Nice that you also mention 
betadisper, because I'd like also to look at variation in species composition 
within the 
factor levels and along the gradient and came about the same issue.

Best wishes
Valérie


 Message du 16/01/13 à 10h08
 De : syro...@sci.muni.cz
 A : v_coudr...@voila.fr
 Copie à : r-sig-ecology@r-project.org
 Objet : Re: [R-sig-eco] Difference between mantel test and adonis
 
 Hi Valérie,
 adonis is analogous to RDA or CCA, as it directly estimates the variance
 in the distance matrix attributable to an independent variables(s), with
 the advantage that one may use any distance measure. It parallels r2 in a
 linear model.
 Mantel test simply calculates the correlation between two distance
 matrices (and tests it via permutations), thus, one gets the idea about
 wthether there is a linear relationship between them at all.
 Cheers,
 Vit
 
  Dear Martin,
  Tank you very much. I thought about constrained ordination, but the
  distance matrix I am using is not among the usual (Euclidian,
  Bray-Curtis,...). An option
  would be to use distance-based RDA, which is almost the same as adonis,
  but I read that adonis should be even better (?) Anyway I am mainly
  interested to
  understand the difference between analyses based on distance matrix of the
  environemental gradient (Mantel test), or on the gradient directly.
  Best,
  Valérie
 
 
  Message du 16/01/13 à 00h53
  De : Martin Weiser
  A : v_coudr...@voila.fr
  Copie à : r-sig-ecology@r-project.org
  Objet : Re: [R-sig-eco] Difference between mantel test and adonis
 
  v_coudr...@voila.fr píše v Út 15. 01. 2013 v 16:08 +0100:
   Dear sig-eco users,
  
   I would like to investigate the changes in a species community along
  an ecological gradient. I first thought about performing a Mantel test
  and infer if
  differences in
   species composition are related to differences in the ecological
  gradient. I noticed that the function adonis (package vegan) could
  handle continuous
  variables as
   well. However, the ecological gradient is not entered as a distance
  matrix and therefore I don't understand exactly how to interpret the
  outcome of the adonis
  test
   and what is the difference to the Mantel test. Any help will be
  apprectiate.
  
   Best wishes. Valerie
   ___
   Les téléviseurs écrans plats sont en soldes sur le comparateur de prix
  de Voila.fr http://shopping.voila.fr/vitrine/televiseurs-ecran-plat
   ___
   Les téléviseurs écrans plats sont en soldes sur le comparateur de prix
  de Voila.fr http://shopping.voila.fr/vitrine/televiseurs-ecran-plat
  
   ___
   R-sig-ecology mailing list
   R-sig-ecology@r-project.org
   https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
 
  Dear Valerie,
  I would go for constrained ordination: it is easily interpretable and
  tailored exactly to your needs.
  To do so, in R use ade4 or vegan (I am not familiar with ade4) and run
  CCA or RDA (depends on data and taste). Plus, Jari Oksanen wrote
  easy-to-understand tutorial:
  http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf
  Another great free resources are Mike Palmer's website:
  http://ordination.okstate.edu/
  and ordnews mailinglist:
  ordn...@colostate.edu
  I hope this helps.
  Best,
  Martin W.
 
 
 
  ___
  Les téléviseurs écrans plats sont en soldes sur le comparateur de prix de
  Voila.fr http://shopping.voila.fr/vitrine/televiseurs-ecran-plat
 
  ___
  R-sig-ecology mailing list
  R-sig-ecology@r-project.org
  https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
 
 
 
 

___
Les téléviseurs écrans plats sont en soldes sur le comparateur de prix de 
Voila.fr http://shopping.voila.fr/vitrine/televiseurs-ecran-plat

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


Re: [R-sig-eco] Difference between mantel test and adonis

2013-01-15 Thread v_coudrain
Dear Martin, 
Tank you very much. I thought about constrained ordination, but the distance 
matrix I am using is not among the usual (Euclidian, Bray-Curtis,...). An 
option 
would be to use distance-based RDA, which is almost the same as adonis, but I 
read that adonis should be even better (?) Anyway I am mainly interested to 
understand the difference between analyses based on distance matrix of the 
environemental gradient (Mantel test), or on the gradient directly. 
Best,
Valérie


 Message du 16/01/13 à 00h53
 De : Martin Weiser 
 A : v_coudr...@voila.fr
 Copie à : r-sig-ecology@r-project.org
 Objet : Re: [R-sig-eco] Difference between mantel test and adonis
 
 v_coudr...@voila.fr píše v Út 15. 01. 2013 v 16:08 +0100:
  Dear sig-eco users,
  
  I would like to investigate the changes in a species community along an 
  ecological gradient. I first thought about performing a Mantel test and 
  infer if 
differences in 
  species composition are related to differences in the ecological gradient. 
  I noticed that the function adonis (package vegan) could handle continuous 
variables as 
  well. However, the ecological gradient is not entered as a distance matrix 
  and therefore I don't understand exactly how to interpret the outcome of 
  the adonis 
test 
  and what is the difference to the Mantel test. Any help will be apprectiate.
  
  Best wishes. Valerie
  ___
  Les téléviseurs écrans plats sont en soldes sur le comparateur de prix de 
  Voila.fr http://shopping.voila.fr/vitrine/televiseurs-ecran-plat
  ___
  Les téléviseurs écrans plats sont en soldes sur le comparateur de prix de 
  Voila.fr http://shopping.voila.fr/vitrine/televiseurs-ecran-plat
  
  ___
  R-sig-ecology mailing list
  R-sig-ecology@r-project.org
  https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
 
 Dear Valerie,
 I would go for constrained ordination: it is easily interpretable and
 tailored exactly to your needs.
 To do so, in R use ade4 or vegan (I am not familiar with ade4) and run
 CCA or RDA (depends on data and taste). Plus, Jari Oksanen wrote
 easy-to-understand tutorial:
 http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf 
 Another great free resources are Mike Palmer's website:
 http://ordination.okstate.edu/ 
 and ordnews mailinglist:
 ordn...@colostate.edu
 I hope this helps.
 Best,
 Martin W.
 
 

___
Les téléviseurs écrans plats sont en soldes sur le comparateur de prix de 
Voila.fr http://shopping.voila.fr/vitrine/televiseurs-ecran-plat

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