Re: [R-sig-eco] rarefied data output
On 03/28/2012 06:09 PM, Jari Oksanen wrote: On 28/03/2012, at 18:59 PM, cristabel.duran wrote: On 03/28/2012 05:36 PM, Jari Oksanen wrote: thank you for your help. I want to know the rarefied richness of single plots. and I just now rarefied my data within each factor level with rarefy(), and I got what I was looking for. I was wondering that the rarefy richness really is much lower than the original: original: P1 P5 P9 P11 P17 P23 P30 P33 P36 P38 P41 P50 P54 P56 P59 P62 9 14 2 8 10 11 6 7 6 16 13 10 11 12 10 12 rarefied: P1 P5 P9 P11 P17 P23 P30 P33 P36 3.313725 2.827956 2.00 3.293040 2.946823 3.592810 2.263004 3.087552 3.195238 P38 P41 P50 P54 P56 P59 P62 3.659412 3.547713 2.555684 3.376906 3.202633 3.227595 3.428148 My data is from regeneration of tropical forest, with few species with high abundance and lots of species with few abundance. I do doubt of the results, but as I never worked with rarefaction I do not know how interpret such a disparity between non-rarefied and rarefied richness. Well, the function has been tested and used before... Study these questions with your data: How many trees did you have originally in each plot? How many trees do you have in your rarefied plots? How many species can you have with that number of trees? Cheers, Jari Oksanen Sorry, I typed too fast my answer. I wanted to say: I do NOT doubt of the results Thanks for your help, Cheers, Cristabel. -- Dr. Cristabel Durán Rangel. Institute of Silviculture. Faculty of Forest and Environmental Sciences. University of Freiburg. Germany Telf: +49 (761) 203 8603 (ofc) https://portal.uni-freiburg.de/waldbau Man lernt die Physiognomie einer Landschaft desto besser kennen, je genauer man die einzelnen Züge auffaßt, sie untereinander vergleicht und so auf dem Wege der Analysis den Quellen der Genüsse nachgeht, die uns das große Naturgemälde bietet. Alexander von Humboldt, 1799 [[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-eco] R and WinBUGS
Dear list members, This is not a very specific question on R for ecological analysis, but is related. I have been in courses where R and WinBugs are used together for data analysis, however, I still don´t understand why R need to use WinBUGS to perform some bayesian analysis. I teach statistics through R for graduate students, however, teaching bayesian statistics using R and Winbugs is not so intuitive. Is harder for them to grasp bayesian statistics in that way. I have read form several authors that bayesian statistics is more intuitive than frecuentist statistics, however, doing through R and WInBUGS, is not the case for students. For example I think student will understand more what they are doing if they only see a line of code for R where you can specify everything and do it only in R, rather than writing things for R and things for WinBUGS. Is really WinBUGS necessary? Is R not capable of doing the same type of analysis? Any input will be appreciated. Best, Manuel -- *Manuel Spínola, Ph.D.* Instituto Internacional en Conservación y Manejo de Vida Silvestre Universidad Nacional Apartado 1350-3000 Heredia COSTA RICA mspin...@una.ac.cr mspinol...@gmail.com Teléfono: (506) 2277-3598 Fax: (506) 2237-7036 Personal website: Lobito de río https://sites.google.com/site/lobitoderio/ Institutional website: ICOMVIS http://www.icomvis.una.ac.cr/ [[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-eco] R and WinBUGS
Algorithms for bayesian inference (MCMC) cannot run fast enough inside a scripting language like R. Most authors create plugins to call their fast binary (C/C++) implementations inside of R. Just use them. I recommend JAGS and rjags. Better errors messages and good support from Plummer. Cya 2012/3/29 Manuel Spínola mspinol...@gmail.com Dear list members, This is not a very specific question on R for ecological analysis, but is related. I have been in courses where R and WinBugs are used together for data analysis, however, I still don´t understand why R need to use WinBUGS to perform some bayesian analysis. I teach statistics through R for graduate students, however, teaching bayesian statistics using R and Winbugs is not so intuitive. Is harder for them to grasp bayesian statistics in that way. I have read form several authors that bayesian statistics is more intuitive than frecuentist statistics, however, doing through R and WInBUGS, is not the case for students. For example I think student will understand more what they are doing if they only see a line of code for R where you can specify everything and do it only in R, rather than writing things for R and things for WinBUGS. Is really WinBUGS necessary? Is R not capable of doing the same type of analysis? Any input will be appreciated. Best, Manuel -- *Manuel Spínola, Ph.D.* Instituto Internacional en Conservación y Manejo de Vida Silvestre Universidad Nacional Apartado 1350-3000 Heredia COSTA RICA mspin...@una.ac.cr mspinol...@gmail.com Teléfono: (506) 2277-3598 Fax: (506) 2237-7036 Personal website: Lobito de río https://sites.google.com/site/lobitoderio/ Institutional website: ICOMVIS http://www.icomvis.una.ac.cr/ [[alternative HTML version deleted]] ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology -- Currículo: http://lattes.cnpq.br/7541377569511492 -- Currículo: http://lattes.cnpq.br/7541377569511492 [[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] Fixing heteroscedasticity in mixed-effects model?
Malin Pinsky malin.pinsky@... writes: I'm having problems fitting a mixed-effects model for an ecological meta-analysis, and I'm curious if anyone has advice. In particular, it's pretty clear that the variance in the residuals increases with the predicted mean, but my normal fixes don't seem to be working. The model is: mod1 - lmer(logCd ~ logRe + Hab + logRe:Hab + (logRe|Study), data=temp) where Cd is a drag coefficient (0 before log-transformation), Re is a physical quantity called a Reynolds number (also 0 before transformation), Hab is a categorical variable for habitat, and Study is a categorical variable for the study the data came from. I know from fluid dynamics theory that logCd and logRe can be linearly related, but I expect that the slope and intercept vary between habitat types and between studies. [big snip to make gmane happy] And, if this belongs on the R-sig-ME list, let me know. Probably. A quick answer is that you should able to incorporate heteroscedasticity in lme (from the nlme function) via something like weights=varPower(): mod1 - lme(logCd ~ logRe*Hab, random=~logRe|Study, data=temp, weights=varPower()) (this might not be quite right, you might want to read ?nlme::varPower and/or the relevant bit of Pinheiro and Bates 2000) If you want to go the Gamma route, you can try (1) the development version of lme4 (install from r-forge, but it might be broken right now ...); (2) glmmADMB ... ... but I would probably suggest lme for now. ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology