[R-sig-eco] null model for testing nestedness
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
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 ___ 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
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
Re: [R-sig-eco] null model for testing nestedness (v_coudr...@voila.fr)
Hi, there should be an easy solution to your problem by using the oecosimu function of the vegan package. It allows you to specify your null model and then use the nestednodf function as an argument within the oecusimu function. Simply look up the help for the oecosimu function for more details. Hope that helps, Lars Götzenberger On 25.9.2013 12:00 PM, r-sig-ecology-requ...@r-project.org wrote: Message: 3 Date: Tue, 24 Sep 2013 20:07:58 +0200 (CEST) From:v_coudr...@voila.fr To:r-sig-ecology@r-project.org Subject: [R-sig-eco] null model for testing nestedness Message-ID: <1121167144.286531380046078873.JavaMail.www@wwinf7125> Content-Type: text/plain; charset=UTF-8 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 icihttp://tv.voila.fr/quiz/quiz-special-friends_14538959.html -- Dr Lars Götzenberger Institute of Botany Czech Academy of Science Dukelská 135 CZ-379 82 Třeboň Czech Republic email: l...@ut.ee website: larsgoetzenberger.wordpress.com I am currently funded by the plantfellows fellowship program. www.plantfellows.ch ___ 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
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