Publications by Bluecology blog
Probability intervals with GAMs
Probability intervals with GAMs A neat trick with GAMs (generalized additive models) fit using the mgcv package is that you can use simulation to get Bayesian credible intervals. This is handy because it means you can easily calculate probabilities for any arbitrary transformation of your parameters. For instance, we used this trick to calculate th...
5310 sym R (1593 sym/6 pcs) 8 img
Introduction to structural causal modelling
Introduction to structural causal modelling A primary goal of science is to understand causes. Structural causal modelling is a framework for developing causal hypotheses to test with data. I taught a workshop at the Australian Marine Sciences Association conferences in 2023. I’ve now provided all the course notes online for free. One if the adva...
1465 sym
Bayesian structural equation model tutorial
Bayesian structural equation model tutorial Structural equation modelling (SEM) is a tool for exploring relationships among multiple variables. lavaan and piecewiseSEM are too of the most widely used and accessible packages for latent variable modelling in R. Both use frequentist methods. It is also possible to develop SEMs in a Bayesian framework....
11299 sym R (3257 sym/21 pcs) 14 img
Why GLMs should be a priority when teaching statistics
Why GLMs should be a priority when teaching statistics There is often debate over the best place to start when teaching students inferential statistics. The teaching of statistics should start with basic understanding of what data are, probability and data visualisation. Beyond that students usually start to learn about inferential methods. The deb...
5940 sym 2 img
Making predictions from GAMs in R explained by an 18th century author
Making predictions from GAMs in R explained by an 18th century author As explained by ChatGPT with some minor edits by me. This post is an example for my post “Tips for using chatGPT to learn R” Pray, let us first summon the mgcv package, that we may avail ourselves of its functions in our quest to fashion a GAM. Hark! Let us summon the ‘mgcv...
1670 sym R (806 sym/6 pcs)
Tips for using chatGPT to learn R
Tips for using chatGPT to learn R ChatGPT can help you learn R code. Here are some tips my team and I have worked out for ways to use the model to help with learning R. There is also an askgpt package now that is meant to integrate ChatGPT directly into RStudio. However, I’ve been unable to get this package to work on my laptop. Ask GPT to explai...
7620 sym R (276 sym/1 pcs)
R workshops Brisbane February 2023
R workshops Brisbane February 2023 Hands-on R training! February 14th-17th 2023 Presenters Professor Anthony J. Richardson (UQ CARM) Professor David Schoeman (University Sunshine Coast) Associate Professor Chris Brown (Griffith University) Dr Christina Buelow (Griffith University) Click links below to register with the University of Queensland. I...
1697 sym
Create an inset plot
How to inset a plot on another plot in R The difficulty of plotting one plot over the top of another in R has always frustrated me. I often end up opening some photo editing software (like Gimp, which is free) and doing it manually. However, manual editing can be frustrating if you need to change the plot. A histogram with a boxplot inset I j...
1256 sym R (134 sym/4 pcs) 2 img
A ‘tidyverse’ approach to simulation models
A ‘tidyverse’ approach to simulation models I am a big fan of Rstudio’s (mainly led by Hadley Wickham) series of R packages known as the ‘tidyverse’. The packages modernise much of R’s functionality to better deal with moderately large databases and programming. There is even a tidyverse package now, so you can hit up all their packa...
3461 sym R (981 sym/9 pcs) 4 img
Extracting exif data from photos using R
Part 1: Extracting exif data from photos using R See the other parts in this series of blog posts. My camera comes with an inbuilt GPS allowing you to geo-reference photos you take. Here is a simple example for how we can use this feature to create an interactive web map in R. The photos come from a survey I did of oysters on a rocky shoreline. I...
1883 sym R (394 sym/5 pcs)