If your field experiment has few replicates (and it probably does), intersperse your treatments rather than randomizing them

The last experiment I did as a graduate student was one where I wanted to experimentally test the effect of predation on parasitism. To do this, I set up large (5,000 L) whole water column enclosures (more commonly called “bags”) in a local lake. These are really labor intensive, meaning I could only have about 10 experimental units. I decided to use a replicated regression design, with two replicates of each of five predation levels. These were going to be arranged in two spatial blocks (linear “rafts” of bags), each with one replicate of each predation level treatment.

Left: two experimental rafts; right: a close up of one of the rafts, showing the five different bag enclosures

As I got ready to set up the experiment, my advisor asked me how I was going to decide how to arrange the bags. I confidently replied that I was going to randomize them within each block. I mean, that’s obviously how you should assign treatments for an experiment, right? My advisor then asked what I would do if I ended up with the two lowest predation treatments at one end and the two highest predation treatments at the other end of the raft. I paused, and then said something like, “Um, I guess I’d re-randomize?”

This taught me an important experimental design lesson: interspersing treatments is more important than randomizing them. This is especially true when there are relatively small numbers of experimental units*, which is often the case for field experiments. In this case, randomly assigning things is likely to lead to clustering of treatments in a way that could be problematic.

When learning R (or any other new task), it’s okay to start small: aim for improvement, not perfection

When I first thought about switching to R and doing reproducible data analysis, the idea was daunting. As a grad student, I couldn’t figure out how to even get my data into R. How would I figure out that plus mixed model analyses plus how to make figures in ggplot, with version control and a beautiful github rep for all of my work?! What I eventually accepted is: it’s okay to start small. Or, as a colleague of mine suggests: for any given project, aim to do one thing in R that you couldn’t before.

I’m not sure why I set the bar so high for initially learning R. When I was first learning how to knit (actually knit, with yarn and needles, not the R version of knit), I knit a square washcloth, not a sweater. So when learning R, why was I expecting I’d be able to start out with the coding version of knitting a sweater with multiple colors, a fancy pattern, and buttons?

Julian Paren / Fair Isle knitwear in the Shetland Museum / CC BY-SA 2.0 via wikimedia.org

Guest post: Coding Club – trying to overcome the fear factor in teaching and learning quantitative skills

This is a guest blog post by ecologists Isla Myers-Smith and Gergana Daskalova from the University of Edinburgh. In case you missed it, they wrote a wonderful guest post this summer on iPads and digital data collection in the field.

Ecology is a fast-paced science, with possibly hundreds of relevant papers published every week and new techniques and quantitative skills being developed all the time. It is easy to feel very behind and overwhelmed. The quantitative skills taught in undergraduate and graduate programs in ecology often lag behind those used in the literature. As ecologists at different stages of our academic careers, who have felt (and still do sometimes) pretty behind the eight ball in terms of quantitative skills, we wanted to do something about that for our students and peers. And that is how we came up with the idea of Coding Club.

How did it all begin?

Just about two years ago we had an idea. What if we set up an informal group and a website to teach key quantitative skills that could be useful to undergrads, grad students, postdocs, profs and ecologists working outside of academia? What if that website was built in a way that anyone could contribute tutorials or help to make the existing tutorials better? What if we taught people how to learn in their own working environment and how to develop their workflow using best practices in open science like version control from the very beginning? What if this content was aimed at people who felt afraid, anxious and behind in their own quantitative skills development. This was the beginning of Coding Club.

The Coding Club website where we host all of our tutorials on data manipulation, data visualisation, modelling and more!

What is Coding Club?

Coding Club combines online and in-person resources to help teach quantitative skills to ecologists at all career stages. We have focused on trying to overcome “code fear” and “statistics anxiety”. Statistics anxiety – the worry about a lack of quantitative skills – and code fear – the fear of programming – can prevent people from learning. By building a sense of community around the development of skills, we hope to overcome the fear factor of ecology involving more code and math than people sometimes expect.

Part of the Coding Club team and snapshots of some of our workshops. Check out our team page for the full list of undergraduates, postgraduates and profs that have contributed to Coding Club! Photo credit for image on left: Sam Sills

Peer-to-peer teaching helps to reduce the fear factor

In Coding Club, we focus on peer teaching and interaction rather than having “trained experts” leading workshops as we feel people engage more when they are less intimidated. All of our teaching materials are developed by people who are actively learning data science skills at the same time as teaching them. We avoid hierarchy (though we love content on hierarchical modelling!) and encourage participation across different career stages from undergrad students through to PhD students, postdocs and staff. Moving away from the professor-student model and allowing everyone to engage as teachers and learners can be a pretty powerful way to break down barriers.

Coding Club covers a growing number of different quantitative skills

The Coding Club website contains a growing list of tutorials aimed at all levels of quantitative skills useful for ecologists and beyond. We cover topics from intro to advanced R tutorials, version control, data visualization to working with large datasets. We have a lot of R content but we don’t just do R! We are currently working on developing more tutorials using Python for process-based modelling and the Google Earth Engine for remote sensing analyses. We have been using the tutorials to teach in-person workshops at the British Ecological Society conference and at universities around the UK, but the tutorials are there online for everyone to use, provide feedback on or suggest revisions through GitHub. We are always looking for people to develop new content as well!

A sample of the Coding Club tutorials, including a tutorial on how to make tutorials on GitHub. Data visualisation, mixed effects models, Stan models and more over here.

Quantitative learning should be active and not passive

We believe that the best way to teach coding and quantitative skills is through a problem-based approach that is question driven. We try to avoid approaches like ‘live coding’ as it encourages learners to be very passive with the subject matter and we believe this results in lower retention of the new material. To effectively learn a new skill, it is vitally important to know why you might want to learn that skill in the first place and to have a question that you want to answer to motivate you to learn. We also recognize that people learn in different ways and at different paces. In our in-person sessions, we encourage people to take as long or as little time as they wish to complete the tutorials. We believe this casual, non-compulsory and non-assessed nature of Coding Club also helps to reduce the fear and anxiety associated with quantitative skills.

Coding our way towards finding out how population trends vary among different taxa, with cookies along the way. Not pictured: the standard error cookie. We forgot to make one, but of course we are all for reporting the uncertainty around effect sizes!

Quantitative skills are not hard – they just take some work to learn

We believe teaching quantitative skills is all about overcoming fear and building confidence. We try to avoid labeling skills as “hard” or “easy”, because we don’t want people labeling themselves as quantitative or not, or pre-judging the limits to their own capabilities. We aim to train people to be able to answer their own questions, resolve their own coding problems and seek out new skill sets independently. We are trying to teach people to train themselves beyond the timespan of a single workshop or course. Finally, we don’t think there is only one way to teach quantitative skills and promoting a diversity of approaches will reach the most people.

Coding Club has exceeded our expectations!

As of October 2018, the Coding Club website has received over 160,000 visits from over 73,000 unique IP addresses from over 180 countries. Our tutorials have been contributed by people from multiple universities (University of Edinburgh, University of Aberdeen, McGill University, Ghent University, Aarhus University) and used for quantitative training across several institutions so far (University of Edinburgh, University of Aberdeen, University of St Andrews, Queens University Belfast, Dartmouth College, Hebrew University, Calvin College, Centre for Ecology and Hydrology and more), and we are hoping to reach out further! If we can set up a network of people at universities and research institutes around the world who can work together to develop quantitative training from the ground up, then maybe we will all feel just a little less overwhelmed by our fast-paced discipline.

The international audience of Coding Club – it’s been great to get feedback from people using our tutorials around the world!

The start of the new academic year feels like a fresh start. A chance to purchase some new office supplies, catch up on all the science missed over the summer, start a new work routine to enhance productivity and to set yourself some new challenges. Now that the term has started, maybe it is time for you to take the plunge and learn a new quantitative skill.

Are you a student or group of students wanting to increase your own quantitative skills? Are you someone who has a cool analytical technique that you want to share with your peers? Are you a prof. who wants to encourage your students and mentees academic development? Are you someone who feels like the quantitative training you got years ago is not enough for the ecological research today and want to brush up on your skills? Do you have thoughts on how we can improve quantitative training in ecology? If you answered yes to any of these questions, please comment below, check out the Coding Club website and get in touch if you are keen to join the team!