Pages

Thursday 4 May 2017

Plotting Binomial Data

I’m finely “passionate” enough to write a new blog post after a year of pseudo productivity on my thesis. That or my funding has run out and I’m just procrastinating more than ever. One or the other.


Anyway, I just returned from the European Cetacean Society in Denmark, which was lovely. Seriously, they have ginger flavoured Pepsi, no wonder Danes are rated the happiest people on earth (despite the high suicide rates…). In general, it was a great conference. Lots of good work, nice people and a prodigious amount of adult beverages.


One thing I did notice, however, was a disturbing trend with plots in both the oral and poster presentations. Many, people did not plot both their data and the model results. Gasp! The horror!

 
Not plotting data with predictions 


In all seriousness though, it’s important to show 1) the data 2) the model and 3) the confidence intervals of both (where applicable). It’s also important to do this on the scale that makes sense for your audience. The reasons for this are numerous. First, humans are visual, we can pick up patterns very quickly. Second, properly presenting data allows both the author and the reader to almost instantaneously assess the how well the model fits the data. Plotting data properly throughout the analysis phase also allows the author to “idiot check” the results during the analysis process. This can prevent headaches or embarrassment later on.


I get it learning R is an uphill battle, I’ve been there. Analysing complex, messy data is a challenge to begin with and adding an extra output to deal with is frustrating. This is particularly true for anyone who isn’t wildly in love with stats or coding (many biologists). The challenge is even worse with binomial data which are common outputs in bioacoustic surveys. Still, plotting your data properly throughout will make your life easier.


The goal of this post is to slowly walk through the entire process of plotting binomial data with model outputs. Here I use simulated data such that it should be the same for everybody and attempt to tie it back to biological principles at each step. We will model the output of simulated data using a generalised additive model (GAM). This is a fairly advanced technique so there will necessarily be more jargon in this post than I would ideally like to include. Apologies in advance.


As you follow along I strongly encourage you to write each line of code yourself rather than copy/paste. This process will help reinforce the commands and ultimately make you a better coder by allowing you to start to de-bug your own work.

Thursday 10 March 2016

Bit Depth or the Shortest Post Ever

Hi All,
Most everyone who might stumble across this blog is familiar with sample frequency (fs) and how it relates to documenting sounds of interest (cliff notes version: sample frequency should be at least twice the target frequency of your study critter's calls/vocalizations).

But what does bit depth refer to? If you've stumbled across the Matlab commands waveread() or adudioread() you would (or should) know that there are multiple outputs including "nbits". N bits most simply means the bit depth of the audio file. What? Is that not helpful? Fine, let me 'splain.

Bit depth refers to the resolution of the amplitude of the sound. So if you need to carefully monitor fluctuations in amplitude levels, you will need a higher bit depth. Thankfully, this doesn't tend to be an issue for most bioacoustic studies. So, unless otherwise noted, just stick with the system defaults and you'll be all set. Hope that helps and let me know if you are doing something that requires high amplitude resolution. I'm super keen to learn about it!

Write, back to the thesis...

Happy recording to you!

Wednesday 16 December 2015

SMM 2015

Welcome to my 2015 Marine Mammal Biennial page.  This page contains explanations of some of the work from the poster presented at the 21st Biennial Conference on the Biology of Marine Mammals. I've added some extra material here pertaining to the extraordinarily geeky components of my poster that wouldn't fit in the allotted space as well as some of the future directions the research will take.