[R-sig-eco] Variation partitioning and Poisson regression
Hi, everyone, I am sorry that my last E-mail showed as messy code. So I send it again. I have one question about the Poisson regression. I have three data frames: X, Y and Z. I want to quantify the relative contributions of Y and Z to the variation of X using variation partitioning method. However, the X only has one column (500 rows) and contains some zero values (about 90 rows are zero), while both Y and Z contain three explanatory variables for each. As I know, the variation partitioning method is based on the linear regression model when the response data table only has one column. Can I use the variation partitioning method directly? Or should I use the Poisson regression method because many zero values are included in my response data table? Adjusted r-square is not available in Poisson regression; instead, we can only get a pseudo r-square. Furthermore, I have not found that Poisson regression contains partial regression algorithm to quantify the relative importance of two explanatory data table. Therefore, if I have to use the Poisson regression, how can I achieve my aim? Thanks for any help and best wishes for you! Lin July 30th, 2012 [[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] Variation partitioning and Poisson regression
Hi, everyone, I have one question about the Poisson regression. I have three data frames: X, Y and Z, as follows. | X | Y | Z | | Y1 | Y2 | Y3 | Z1 | Z2 | Z3 | | 4 | 446.3768 | -3.25575 | 27.85502 | 58.89589 | 21.44272 | 1.429652 | | 9 | 437.569 | -0.998 | 24.81672 | 57.96077 | 19.24162 | 1.591081 | | 13 | 426.9423 | 1.20875 | 31.47058 | 58.06966 | 17.69528 | 1.933682 | | 4 | 413.7538 | 2.03325 | 36.00697 | 54.45679 | 16.94219 | 2.322985 | | 11 | 400.1235 | 2.6575 | 34.32918 | 52.57843 | 16.59206 | 2.392409 | | 16 | 387.4307 | 4.24225 | 33.24652 | 48.60116 | 16.29428 | 2.542971 | | . . . | . . . | . . . | . . . | . . . | . . . | . . . | I want to quantify the relative contributions of Y and Z to the variation of X using variation partitioning method. However, the X only has one column (500 rows) and contains some zero values (about 90 rows are zero), while both Y and Z contain three explanatory variables. As I know, the variation partitioning method is based on the linear regression model when the response data table only has one column. Can I use the variation partitioning method directly? Or should I use the Poisson regression method because many zero values are included in my response data table? As we know, adjusted r-square is not available in Poisson regression; instead, we can only get a pseudo r-square. Furthermore, I have not found that Poisson regression contains partial regression algorithm to quantify the relative importance of two explanatory data table. Therefore, if I have to use the Poisson regression, how can I achieve my aim? Thanks for any help and best wishes for you! Lin July 30th, 2012 [[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 block effect significance in 'adonis' PERMANOVA
On Fri, 2012-07-27 at 09:45 +0100, Gavin Simpson wrote: > On Mon, 2012-07-23 at 10:31 -0200, Alexandre Fadigas de Souza wrote: > > Dear friends, > > > >In performing a PERMANOVA in VEGAN's 'adonis' function, we can use strata > > to indicate a blocking variable. Contrary to standard statistical packages, > > however, adonis' output does not include the block variable explicitly among > > its Sources of Variation. Sorry but the first line of my reply contains a critical typo: > That is what is intended for `strata`. That should have read "That is *not* what is intended for `strata`." Hopefully that was obvious given the following sentence, but I hope I didn't lead to any confusion. G > It is a conditioning variable for > the permutation test *only*, so it never enters into the computations > other than to force the permutations to be freely exchangeable within > each hill but not exchangeable between hills. > > If you want to include the effect of hill it needs to be included as a > variable in the formula. > > I'm not fully familiar with adonis() but if you include hill in the > fixed effects formula then I don't think you can't test significance of > hill if you also use `strata = hill` (because each permutation will > essentially have the same samples allocated at the hill level. > > HTH > > G > > >Sometimes, as is my present situation, the blocking variable is > > interpretable and we want to know whether it varied significantly. > > > >I could not find this discussion in the log files of this list. > > > >Our response variable is the abundances of tree species in 18 square > > plots > > in southern Brazil, our explanatory variables are distance to a power dam > > (near x far, binary) and altitude. Our strata/blocking variable is hill, > > since > > treatments near or far from the power dam were replicated on the slopes of > > three different hills. > > > >It would be important to know if there were compositional differences > > between hills but this result does not appear in the output. We tried to > > force > > its appearance using the following formula, but I do not know if this > > distorts > > the analysis: > > > > > adonis (species ~ hill + dam + altitude + declivity, method="Chao", > > > strata > > = environment$hill, perm=4999) > > > > Thanks in advance for your attention, > > > > Alexandre > > > > ___ > > R-sig-ecology mailing list > > R-sig-ecology@r-project.org > > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology > > > -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
[R-sig-eco] Hegyi competiton indices
Hi, Does someone know How to calculate *Hegyi's* competition indices using spatstat or some other package maybe. Thanks a lot -- Stjepan [[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] constant speed to animal trajectory
Hello Kylie, You may be able to do what you want with functions in the RNCEP package. Specifically the function NCEP.flight() Perhaps something like the following would work... ## Load the RNCEP library library(RNCEP) ## Using equation groundspeed, i.e. holding the animal's speed relative to the ground constant (see ?NCEP.Groundspeed), ## move the animal from a starting location to an ending location. ## The animal's speed relative to the ground is set by 'groundspeed' in 'fa.args' ## By specifying that u and v both equal zero, we indicate that there are no wind conditions to consider ## Note that we set query=FALSE so that wind conditions are not queried from the Internet. out <- NCEP.flight(beg.loc=c(55,10), end.loc=c(45,0), begin.dt="2009-01-01 12:01:01", flow.assist='NCEP.Groundspeed', fa.args=list(u=0, v=0,groundspeed=12), path='loxodrome', calibrate.dir=FALSE, calibrate.alt=FALSE, cutoff=-10, when2stop=list('latitude','longitude',0.01), levels2consider=NULL, hours=12, evaluation.interval=60, id=1, land.if.bad=FALSE, reanalysis2 = FALSE, query=FALSE) ## Show the resulting trajectory, coloring the points by distance to end location ## NCEP.vis.points(wx=out$dist2goal, lats=out$lat, lons=out$lon) ### Hope this helps. Kind regards, Michael On Sat, Jul 28, 2012 at 12:00 PM, wrote: > Send R-sig-ecology mailing list submissions to > r-sig-ecology@r-project.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology > or, via email, send a message with subject or body 'help' to > r-sig-ecology-requ...@r-project.org > > You can reach the person managing the list at > r-sig-ecology-ow...@r-project.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of R-sig-ecology digest..." > > > Today's Topics: > >1. Assign constant speed to animal trajectory - recommendations > for function? (Kylie Scales) >2. Re: Assign constant speed to animal trajectory - > recommendations for function? (Pinaud David) > > > -- > > Message: 1 > Date: Fri, 27 Jul 2012 11:29:18 +0100 > From: Kylie Scales > To: r-sig-ecology@r-project.org > Subject: [R-sig-eco] Assign constant speed to animal trajectory - > recommendations for function? > Message-ID: > < > caocvvho9+zsb1_rrjghy3f9anzfodz41z3ugzkxs1djyveh...@mail.gmail.com> > Content-Type: text/plain > > I am currently conducting a 'First Passage Time' (fpt) animal movement > analysis, in order to identify ARS zones from GPS tracks. > > The study species in question frequently rests on the water surface during > darkness hours. To avoid artificial inflation of fpt, I have removed these > points and have used the variance in the log of fpt to identify scales of > ARS behaviour within each of these track sub-sets. This has worked for > smaller-scale ARS zones, but not larger scales, owing to the separation of > each trip into daylight-only sections. > > I would like to assign a constant speed to the whole trajectory for each > bird and then conduct a fpt analysis on the whole trajectory, to get an > indication of larger-scale ARS. > > Could anyone recommend a function that could be used to rediscretize an > animal trajectory to constant speed? > > I've tried redisltraj() from package adehabitatLT to rediscretize step > length at a constant interval, and then setNA() followed by sett0() to > create constant time interval, but this results in a lot of NAs in x/y, > which then seems to constain the fpt analysis. > > Is there a better way to assign constant speed to the whole trajectory? > > Any advice much appreciated. > > Kylie Scales > Postgraduate Researcher > Plymouth Marine Laboratory > > [[alternative HTML version deleted]] > > > > -- > > Message: 2 > Date: Fri, 27 Jul 2012 13:25:04 +0200 > From: Pinaud David > To: r-sig-ecology@r-project.org, klscale...@gmail.com > Subject: Re: [R-sig-eco] Assign constant speed to animal trajectory - > recommendations for function? > Message-ID: <50127a90.3010...@cebc.cnrs.fr> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Kylie, > To my knowledge, there is no such a function. > Maybe you could calculate the distance between successive locations then > recalculate the time at each location, assuming a constant speed : > ie t2 = t1 + dist(t12) / cstSpeed > > Something like: > > # tr is a trip object or a SpatialPointsDataFrame > dist <- trackDistance(coordinates(tr), longlat = T) > tr@data$newtime <- c(tr@data$time[1], tr@data$time[1] + > cumsum(dist/CstSpeed)) > > HTH > > David > > > Le 27/07/2012 12:29, Kylie Scales a ?crit : > > I am currently conducting a 'First Passage Time' (fpt) animal movement > > analysis, in order to identify ARS zones from GPS tracks. > > > > The study