Posts

A step-by-step guide to marginalizing over discrete parameters for ecologists using Stan

Everything you might have been afraid to ask about implementing models with discrete parameters in Stan. Written for ecologists that know BUGS, JAGS, or NIMBLE, and want to use Stan. Provides an example by marginalizing over partly observed presence/absence states in a simple occupancy model.

Behind the paper: Neural hierarchical models of ecological populations

papers

A high-level overview, an example, and a call to action.

Yes, but does it (still) run?

Migrating from Jekyll to distill, with some reflections on the past 6 years.

Gaussian predictive process models in Stan

stan
spatial

Gaussian processes that scale to larger data.

The five elements ninjas approach to teaching design matrices

teaching

In-class activities to teach design matrices from multiple perspectives.

First year books

rants

10 books I wish I had entering graduate school.

The IQUIT R video series

teaching

A series of introductory R videos.

Plotting spatial neighbors in ggplot2

visualization
spatial

How to visualize spatial neighbors using ggplot2, spdep, and sf.

Why I think twice before editing plots in Powerpoint, Illustrator, Inkscape, etc.

visualization
rants

TLDR: scripting plots is more reproducible and efficient long term

Notes on shrinkage and prediction in hierarchical models

teaching

Partial pooling and the best NBA free throw shooters of all time.

Dynamic occupancy models in Stan

stan

Dynamic multi-year occupancy models, marginalizing over latent occurrence states.

Categorical spatial data extraction around buffered points in R

spatial

Computing the proportion of land cover types using R and the raster package.

Multilevel modeling of community composition with imperfect detection

jags

A guest post by Joe Mihaljevic.

Shiny variance inflation factor sandbox

shiny
teaching

Exploring how correlation among covariates inflates uncertainty in coefficient estmates.

Stochastic search variable selection in JAGS

jags

Using spike and slab priors to shrink coefficients toward zero.

Better living through zero-one inflated beta regression

jags

Fitting a Bayesian ZOIB regression model in JAGS.

Errors-in-variables models in stan

stan

Fitting a Bayesian regression with covariate uncertainty.

R Markdown and my divorce from Microsoft Word

rants

A short description of the post.

Animating the Metropolis algorithm

visualization
teaching

A homemade Metropolis algorithm animation using R and the animation package.

Quantifying uncertainty around R-squared for generalized linear models

jags

How to propage posterior uncertainty to R-squared in R and JAGS.

Clarifying vague interactions

visualization
rants

One quick way to improve reporting of interaction effects in linear models.

Split violin plots

visualization

Comparing distributions with split violin plots in R.

Bayesian model II regression in JAGS

jags

Fitting a regression model with uncertainty in the explanatory variable.

Modeling habitat diversity and species richness

Experimenting with an agent based model of habitat diversity and species richness in R.

Interactive two host SIR model

shiny
teaching

Creating an interactive two host SIR model in R and shiny.

Interactive stage-structured population model

teaching
shiny

Building an interactive stage-structured population model in R with shiny.

Dynamic community occupancy modeling with R and JAGS

jags

Multi-species, multi-timestep occupancy model in R and JAGS

More articles »

Posts

Corrections

If you see mistakes or want to suggest changes, please create an issue on the source repository.

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/mbjoseph/mbjoseph.github.io, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".