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