Re: [R-sig-eco] angular statistics
If you use these, remember that R cos() needs argument in radians. Cheers, Jari Oksanen Sent from my iPad On 18.10.2013, at 8.40, Ivailo ubuntero.9...@gmail.com wrote: On Fri, Oct 18, 2013 at 6:16 AM, Michael Marsh sw...@blarg.net wrote: If you want a measure of exposure, i. e., heat, I suggest using the heatload transformation suggested by McCune and Grace (2002). Their assumption is that mid-afternoon, when the sun is in the southwest, is usually the warmest time of day. The formula at the end of Chapter 3 follows: heat load index=(1-cos(degrees-45))/2 McCune, Bruce and James B. Grace. 2002. Analysis of ecological communities. MJM Software Design. Gleneden Beach, Oregon. USA Thanks for the interesting discussion! I'd like to add that although I don't have the book, I found the radiation measures presented in the following paper: McCune, B. and D. Keon. 2002. Equations for potential annual direct incident radiation and heat load. Journal of Vegetation Science 13:603–606. Cheers, Ivailo -- UBUNTU: a person is a person through other persons. ___ 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
Re: [R-sig-eco] angular statistics
If you want a measure of exposure, i. e., heat, I suggest using the heatload transformation suggested by McCune and Grace (2002). Their assumption is that mid-afternoon, when the sun is in the southwest, is usually the warmest time of day. The formula at the end of Chapter 3 follows: heat load index=(1-cos(degrees-45))/2 McCune, Bruce and James B. Grace. 2002. Analysis of ecological communities. MJM Software Design. Gleneden Beach, Oregon. USA Mike Marsh On 10/16/2013 3:00 AM, r-sig-ecology-requ...@r-project.org 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. angular statistics (Peter Nelson) 2. Re: angular statistics (Holland, Jeffrey D) 3. Re: angular statistics (Don McKenzie) 4. Re: angular statistics (Peter Nelson) 5. Re: angular statistics (Donald McKenzie) -- Message: 1 Date: Tue, 15 Oct 2013 09:59:38 -0700 From: Peter Nelson pnel...@cfr-west.org To: r-sig-ecology@r-project.org Subject: [R-sig-eco] angular statistics Message-ID: 0c3c26ea-5599-4570-b205-5feecb70b...@cfr-west.org Content-Type: text/plain; charset=us-ascii I want to include the exposure (measured in degrees, for example, East-facing is 90) of various coastal sites in GLM and CCA analyses. Is there an appropriate transformation that I can apply to these measurements that will allow me to do this? I've found plenty of information on comparing headings, calculating means, etc, but nothing on how exposure might be used as a continuous independent variable. Treating exposure as a categorical variable (East, Southwest, etc) seems like a fallback option, but then there is just as much of a 'difference' between SE and E sites as there is between SE and NW sites! Thanks, Pete -- Message: 2 Date: Tue, 15 Oct 2013 17:10:43 + From: Holland, Jeffrey D jdhol...@purdue.edu To: R-sig-ecology@r-project.org R-sig-ecology@r-project.org Subject: Re: [R-sig-eco] angular statistics Message-ID: 30a9cce0a986f74c837d6f87f9c581861367e...@wpvexcmbx01.purdue.lcl Content-Type: text/plain; charset=us-ascii Hello Pete, You could include the sine and cosine of the angles. A good book on this kind of analysis: Fisher, N.I. 1993. Statistical Analysis of Circular Data. Cambridge Univ. Press. To make this closer to exposure, perhaps you could first rotate the compass so that 360' is facing the direction of maximum exposure, and back-transform later? Just a thought. Cheers, Jeff Jeffrey D. Holland (765) 494-7739 Assoc. Prof. of Landscape Ecology Biodiversityjdhollan #at# purdue.edu Dept. of Entomology, Purdue University Smith Hall B17, 901 W. State St., West Lafayette, IN 47907 -Original Message- From: r-sig-ecology-boun...@r-project.org [mailto:r-sig-ecology-boun...@r-project.org] On Behalf Of Peter Nelson Sent: Tuesday, October 15, 2013 1:00 PM To: r-sig-ecology@r-project.org Subject: [R-sig-eco] angular statistics I want to include the exposure (measured in degrees, for example, East-facing is 90) of various coastal sites in GLM and CCA analyses. Is there an appropriate transformation that I can apply to these measurements that will allow me to do this? I've found plenty of information on comparing headings, calculating means, etc, but nothing on how exposure might be used as a continuous independent variable. Treating exposure as a categorical variable (East, Southwest, etc) seems like a fallback option, but then there is just as much of a 'difference' between SE and E sites as there is between SE and NW sites! Thanks, Pete ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology -- Message: 3 Date: Tue, 15 Oct 2013 11:45:14 -0700 From: Don McKenzie d...@u.washington.edu To: Peter Nelson pnel...@cfr-west.org Cc: r-sig-ecology@r-project.org Subject: Re: [R-sig-eco] angular statistics Message-ID: cd8bb4be-0db6-4863-b8af-1d7443d79...@u.washington.edu Content-Type: text/plain There is precedent in the ecological literature for using a cosine transformation IF you have reason to believe that your predictor varies continuously and symmetrically in its effects around a circle. For example, if due east were the most exposure, and due west the least, with due north and south being roughly equal, you could
Re: [R-sig-eco] angular statistics
On Fri, Oct 18, 2013 at 6:16 AM, Michael Marsh sw...@blarg.net wrote: If you want a measure of exposure, i. e., heat, I suggest using the heatload transformation suggested by McCune and Grace (2002). Their assumption is that mid-afternoon, when the sun is in the southwest, is usually the warmest time of day. The formula at the end of Chapter 3 follows: heat load index=(1-cos(degrees-45))/2 McCune, Bruce and James B. Grace. 2002. Analysis of ecological communities. MJM Software Design. Gleneden Beach, Oregon. USA Thanks for the interesting discussion! I'd like to add that although I don't have the book, I found the radiation measures presented in the following paper: McCune, B. and D. Keon. 2002. Equations for potential annual direct incident radiation and heat load. Journal of Vegetation Science 13:603–606. Cheers, Ivailo -- UBUNTU: a person is a person through other persons. ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Re: [R-sig-eco] angular statistics
An alternative might be to consider cyclic splines in mgcv? this would enable you to fit a gam(m) with two 'ends' (1deg and 359 deg) that match up, but might allow more flexibility than combinations of sine/cosine? something along the lines of gam(response ~ s(exposure, bs='cc'), family=...) I've used it successfully to look at seasonal effects through the year. I imagine it would apply to circular data too, but happy to be told otherwise good luck! cheers rob ** The new Bird Atlas is coming: http://www.bto.org/shop/bird-atlas *** Dr Rob Robinson, Principal Ecologist British Trust for Ornithology, The Nunnery, Thetford, Norfolk, IP24 2PU Ph: +44 (0)1842 750050 E: rob.robin...@bto.org Fx: +44 (0)1842 750030 W: www.bto.org/about-bto/our-staff/rob-robinson == How can anyone be enlightened, when truth is so poorly lit === On 16 October 2013 12:47, David Warton david.war...@unsw.edu.au wrote: Hi Peter and Don, unless you have an actual reason for only caring about the East-West axis, rather than all directions, you should include both cos and sin: cos(exposure*PI/180) and sin(exposure*PI/180) as Jeffrey originally suggested. [or more generally, cos(exposure*2*PI/T) and sin(exposure*2*PI/T) where T is the period of your circular variable] Geometrically, this maps the variable onto the unit circle (or in this case perhaps we should call it the unit compass?). All the best David __ David Warton Associate Professor and Australian Research Council Future Fellow School of Mathematics and Statistics and the Evolution Ecology Research Centre The University of New South Wales NSW 2052 AUSTRALIA phone (61)(2) 9385-7031 fax (61)(2) 9385-7123 http://www.eco-stats.unsw.edu.au [[alternative HTML version deleted]] ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology [[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] angular statistics
Peter, For my purposes (I.e., estimating exposure and drying potential in northern hemisphere temperate forests), I simply subtract 45 degrees from the measured aspect in degrees, convert to radians, and then take the cosine of the adjusted angle. If I want to make exposure positive, I then reverse the sign. In this way, southwest-facing slopes get the maximum value (1) and northeast-facing slopes get the lowest (-1). As others have mentioned, this approach gives equal weight to east-west and north-south variation in exposure, which may or may not be valid for a given situation. In your case, it sounds like you want to assume the east-facing aspects are maximally exposed. In that case, I would just subtract 90 degrees from your degrees measurement, convert to radians, and then take the cosine, which I believe amounts to the same approach that Don suggested. East-facing slopes should end up with a value of 1 and west-facing slopes a value of -1 (due north and south will have values of 0). If you want to give north-facing aspects less exposure than south-facing aspects (I don't know whether you are in the northern or southern hemisphere), then you could subtract 135 degrees from your measurements, making southeast aspects the most exposed. Steve 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 10/15/13 11:59 AM, Peter Nelson pnel...@cfr-west.org wrote: I want to include the exposure (measured in degrees, for example, East-facing is 90) of various coastal sites in GLM and CCA analyses. Is there an appropriate transformation that I can apply to these measurements that will allow me to do this? I've found plenty of information on comparing headings, calculating means, etc, but nothing on how exposure might be used as a continuous independent variable. Treating exposure as a categorical variable (East, Southwest, etc) seems like a fallback option, but then there is just as much of a 'difference' between SE and E sites as there is between SE and NW sites! Thanks, Pete ___ 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] angular statistics
I want to include the exposure (measured in degrees, for example, East-facing is 90) of various coastal sites in GLM and CCA analyses. Is there an appropriate transformation that I can apply to these measurements that will allow me to do this? I've found plenty of information on comparing headings, calculating means, etc, but nothing on how exposure might be used as a continuous independent variable. Treating exposure as a categorical variable (East, Southwest, etc) seems like a fallback option, but then there is just as much of a 'difference' between SE and E sites as there is between SE and NW sites! Thanks, Pete ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Re: [R-sig-eco] angular statistics
Make sure you use consistent units. PI/2 in radians, 90 in degrees. cos(90-90) = 1, cos(270 - 90) = -1. So west (270) has the lowest value, east the highest. On Tue, 15 Oct 2013, Peter Nelson wrote: Thanks Don. I tried the transformation you suggested, but the results don't appear promising (0 deg doesn't = 360 deg, intervals vary): 0 6.12574E-17 10 -0.54402 20 0.912945251 30 -0.988031624 40 0.74511316 50 -0.262374854 60 -0.304810621 70 0.773890682 80 -0.993888654 90 0.893996664 I tried east.exposure=cos(exposure*PI/180) This seems better (e.g., 0 degrees = 360 degrees) see below), but the absolute values of the intervals aren't consistent. No surprise, I suppose, but what to do? Thanks, Peter 0 1 10 0.984807753 20 0.939692621 30 0.866025404 40 0.76603 50 0.64278761 60 0.5 70 0.342020143 80 0.173648178 90 6.12574E-17 100 -0.173648178 110 -0.342020143 120 -0.5 130 -0.64278761 140 -0.76603 150 -0.866025404 160 -0.939692621 170 -0.984807753 180 -1 190 -0.984807753 200 -0.939692621 210 -0.866025404 220 -0.76603 230 -0.64278761 240 -0.5 250 -0.342020143 260 -0.173648178 270 -1.83772E-16 280 0.173648178 290 0.342020143 300 0.5 310 0.64278761 320 0.76603 330 0.866025404 340 0.939692621 350 0.984807753 360 1 On Oct 15, 2013, at 11:45 AM, Don McKenzie d...@u.washington.edu wrote: There is precedent in the ecological literature for using a cosine transformation IF you have reason to believe that your predictor varies continuously and symmetrically in its effects around a circle. For example, if due east were the most exposure, and due west the least, with due north and south being roughly equal, you could create a new predictor called east.exposure with (most basically) east.exposure = cos(exposure - PI/2) Many more complicated extensions of this idea are possible, associated with nonlinear or asymmetrical gradients, but I will leave that to you or others on the list. On Oct 15, 2013, at 9:59 AM, Peter Nelson wrote: I want to include the exposure (measured in degrees, for example, East-facing is 90) of various coastal sites in GLM and CCA analyses. Is there an appropriate transformation that I can apply to these measurements that will allow me to do this? I've found plenty of information on comparing headings, calculating means, etc, but nothing on how exposure might be used as a continuous independent variable. Treating exposure as a categorical variable (East, Southwest, etc) seems like a fallback option, but then there is just as much of a 'difference' between SE and E sites as there is between SE and NW sites! Thanks, Pete ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology Don McKenzie Affiliate Professor School of Environmental and Forest Sciences University of Washington d...@uw.edu ___ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology