Publications by Nicholas Clark

Detection error logistic regression in Stan

22.02.2023

Required libraries cmdstanr MASS ggplot2 viridis Purpose and model introduction This script simulates binary observations of an imperfectly observed data generating process (i.e. our measurements are made with error). It also provides Stan code for estimating parameters of the model in a Bayesian framework. The true infection status \(z\) is a...

7668 sym R (11798 sym/21 pcs) 4 img

Poisson Gaussian Process

13.02.2023

Required libraries cmdstanr MASS raster ggplot2 Purpose and model introduction This script simulates Poisson observation model of an underlying spatially autocorrelated data generating process, and provides Stan code for estimating parameters of the model in a Bayesian framework. Observations \(\boldsymbol{Y}\) are assumed to be drawn from a P...

11796 sym R (15207 sym/57 pcs) 15 img

mvgam case study 2: multivariate models

19.01.2022

In this example we will examine multivariate forecasting models using mvgam, which fits GAMs using MCMC sampling via the JAGS software (Note that JAGS is required; installation links are found here). First a simulation experiment to determine whether mvgam's inclusion of complexity penalisation works by reducing the number of un-needed dynamic fa...

10592 sym R (32642 sym/127 pcs) 44 img

mvgam case study 1: model comparison and data assimilation

18.01.2022

Generalised Additive Models (GAMs) are incredibly flexible tools that have found particular application in the analysis of time series. In ecology, a host of recent papers and workshops (i.e. the 2018 Ecological Society of America workshop on GAMs that was hosted by Eric Pedersen, David L. Miller, Gavin Simpson, and Noam Ross) have drawn special ...

29029 sym R (38505 sym/241 pcs) 54 img

mvgam case study 3: distributed lag models

09.02.2022

Here we will use the mvgam package, which fits dynamic GAMs using MCMC sampling via the JAGS software (Note that JAGS is required; installation links are found here), to estimate paramaters of a Bayesian distributed lag model. These models are used to describe simultaneously non-linear and delayed functional relationships between a covariate and ...

10407 sym R (19528 sym/82 pcs) 17 img

Bayesian CRF JSDM

24.04.2022

Joint species distribution models (JSDMs) typically either estimate residual species association networks or induce correlations among species using latent variables. These models usually do not examine direct effects (i.e. the conditional effect of one species' presence on another's occurrence probability), nor do they allow these effects to var...

5447 sym R (27471 sym/34 pcs) 15 img