[R-sig-eco] NMDS with varying sampling effort

2012-08-03 Thread Tim Meehan
Hi all, I am working with butterfly community data (rows=60 study sites, columns=120 species, cells=0 to 1500 individuals counted). I am using the metaMDS function from the vegan package to do NMDS, and then using the envfit function from vegan to link community structure to landscape covaria

Re: [R-sig-eco] Replacing values in a data frame

2012-10-25 Thread Tim Meehan
You can also try using ifesle() A$X2 <- ifelse(A$X2>1, 1, A$X2) On Thu, Oct 25, 2012 at 2:08 PM, Peter Solymos wrote: > Maybe: > A$X2[A$X2>1] <- 1 > > Peter > > -- > Péter Sólymos, Dept Biol Sci, Univ Alberta, T6G 2E9, Canada AB > soly...@ualberta.ca, Ph 780.492.8534, http://psolymos.github.com

Re: [R-sig-eco] lm.morantest: listw?

2012-11-07 Thread Tim Meehan
Hi Ellen, Luc Anselin has written several nice guides for spatial statistics in GeoDa and R. For starters, try searching for "luc anselin r spatial workbook 2007" and check out the 2007 version of the spatial regression analysis workbook. Best, Tim On Tue, Nov 6, 2012 at 4:24 AM, ellenpape w

Re: [R-sig-eco] GLM: calculate percentage deviance of factor

2012-11-30 Thread Tim Meehan
Hi Jade, You should look into the hier.part package. I know it works for glm but you might try it for glm.nb. Best, Tim On Fri, Nov 30, 2012 at 6:40 AM, Martin Weiser wrote: > Jade Maggs pí¹e v Èt 01. 11. 2012 v 16:02 +0200: > > Dear list, > > > > I have run a generalized linear model with ne

Re: [R-sig-eco] Projecting model to landscape

2013-03-05 Thread Tim Meehan
Hi Li, I am sure there are many ways to do this in R. When I have done this type of thing in the past, I have applied a predictive equation to each raster cell using map algebra in ArcGIS (raster calculator tool). In R, there are similar tools in the 'raster' package, apparently. A quick google

Re: [R-sig-eco] All possible model selection using AIC or AICc WITH repeated measures

2013-04-26 Thread Tim Meehan
Hi Lizzie, MuMIn is good for this. You can compare AICs of mixed-effects models, where the random component related to repeated measures is held constant, and fixed effects are evaluated using an all possible subsets approach. Specifically, look at the dredge function for automated creation and a

Re: [R-sig-eco] Beginner in R spatial Analysis

2013-07-09 Thread Tim Meehan
Here are some very helpful documents from Luc Anselin: http://openloc.eu/cms/storage/openloc/workshops/UNITN/20110324-26/Basile/Anselin2007.pdf http://labs.bio.unc.edu/Buckley/documents/AnselinIntroSpatRegres.pdf https://geodacenter.asu.edu/system/files/rex1.pdf On Tue, Jul 9, 2013 at 10:46 AM,

Re: [R-sig-eco] Plot question

2014-03-23 Thread Tim Meehan
Hi Luis, You can try this: # enter data spider <- c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5) prey <- c("cockroach","ant","termite","fly","isopod","cockroach","ant","termite","fly","isopod","cockroach","ant","termite","fly","isopod","cockroach","ant","termite","fly","isopod","cockroach",

Re: [R-sig-eco] Using multiple species data for gam

2015-02-10 Thread Tim Meehan
If you want to do this in a glm framework, you might look into the mvabund package: http://cran.r-project.org/web/packages/mvabund/mvabund.pdf I've never used it with anything approaching 1000 species, though. On Tue, Feb 10, 2015 at 2:41 AM, Rajendra Mohan panda wrote: > Dear All > > I have >

Re: [R-sig-eco] How to incorporate spatial autocorrelation in multivariate GLM

2015-09-09 Thread Tim Meehan
Hi Alexandre, Not sure what the best solution is, but a few hacker ideas come to mind. First, you could create a spatially lagged variable from scratch. This would be created by deciding on a neighborhood size, say first order neighbors, and then creating a variable that was the average respons