*Skip the chat and go straight to the code: ISBE Plasticity Tutorial*

I’ve just about recovered from an excellent time at the 16th congress of the International Society for Behavioral Ecology (ISBE), where I saw a ton of cool science, caught up with loads of friends, and learned (and drank, and ate) a lot! I also gave my first talk on the work I’ve been doing in my postdoc with Alastair Wilson – hopefully I can figure out how to share my slides on here at some point – which seemed to go over reasonably well.

At the end of the conference there were various symposia, and I went to one on ‘The Causes and Consequences of Behavioural Plasticity‘ (organised by Suzanne Alonzo and Nick Royle). I had some code I’d made for a previous workshop in our department, so gave a quick tutorial on how to model plasticity (in particular, among-individual differences in plasticity) in R. Unfortunately the licence servers for ASreml had gone down until an hour before lunch, so I didn’t end up showing the multivariate modelling (also turns out I’d forgotten how hard it is to present something in any kind of charismatic fashion when you are scrolling through code and haven’t really had any sleep)… but I have gathered together the code for modelling individual differences in plasticity in both a ‘reaction norm’ (random regression) and ‘character state’ (multivariate modelling) framework at the link:

**-> -> ISBE Plasticity Tutorial <- <-**

Any comments / suggestions very welcome – just fire me an email, or contact me on twitter! I’m currently working on the manuscript for the work I showed at ISBE, which involved using multivariate models, matrix comparisons etc to figure out the plasticity of personality structure over different contexts – the code (and data) will be made available when the paper is out…

A quick, very unsubtle plug: bookings are now being taken for the next Advancing in R workshop run by PR Statistics (taught by Luc Bussière, with me as glamorous assistant), where we cover data wrangling, visualisation, and regression models from simple linear regression up to random regression. We will also teach the ‘ADF method’ for your statistical modelling workflow – hopefully also to be immortalised in a paper at some point!

**Update 1**

I have been reminded to stress a very important point…

good work – but remember plasticity is not a trait! https://t.co/pKrUMQ7j5A

— Alastair Wilson (@ali__wilson) August 9, 2016

**Update 2**

One of the comments I received on this was from Luis Apiolaza, he of quantitative genetics, forestry, and many excellent ASreml-r blog posts. He noted that – had he been writing such a tutorial – he would typically have started from the multivariate approach, and extended to random regression from there (citing a recent study in which they had 80+ sites/traits). I think this is a good point to make, in particular the realisation that it’s very easy to just think about our own studies (as I was doing).

My work is usually in the laboratory, so I’m likely to have a small number of traits / controlled environments that I’ve observed. In these cases, while reaction norms are easy to draw and to think about, modelling the data as character states actually provides me with more useful information. I am also aware that – in ecology and evolution – random regression models have been pushed quite hard, to the extent that it’s seen almost as a ‘one size fits all’ solution, and people are often unaware of the relative advantages of character state models. However, they are not always suitable for the data: it may be that there are too many traits/environments to estimate all the variances and covariances, or – as in another study I’m involved with – the repeated measurements of an individual are taken on an environmental gradient, but it is not possible to control the exact points on that gradient. In that case, of course, we can use random regression to estimate differences in plasticity using all of our data, and convert the intercept-slope covariance matrix to character state for specific values of our environmental predictor if we want to look at relative variation.

I’m not convinced there’s truly a ‘right answer’, rather that it’s nice to have the option of both types of models, and to know the relative advantages / disadvantages of each…