Posts

Image

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.

Image

Behind the paper: Neural hierarchical models of ecological populations

papers

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

Image

Yes, but does it (still) run?

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

Image

Gaussian predictive process models in Stan

stan
spatial

Gaussian processes that scale to larger data.

Image

The five elements ninjas approach to teaching design matrices

teaching

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

Image

First year books

rants

10 books I wish I had entering graduate school.

Image

The IQUIT R video series

teaching

A series of introductory R videos.

Image

Plotting spatial neighbors in ggplot2

visualization
spatial

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

Image

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

visualization
rants

TLDR: scripting plots is more reproducible and efficient long term

Image

Notes on shrinkage and prediction in hierarchical models

teaching

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

Image

Dynamic occupancy models in Stan

stan

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

Image

Categorical spatial data extraction around buffered points in R

spatial

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

Image

Multilevel modeling of community composition with imperfect detection

jags

A guest post by Joe Mihaljevic.

Image

Shiny variance inflation factor sandbox

shiny
teaching

Exploring how correlation among covariates inflates uncertainty in coefficient estmates.

Image

Stochastic search variable selection in JAGS

jags

Using spike and slab priors to shrink coefficients toward zero.

Image

Better living through zero-one inflated beta regression

jags

Fitting a Bayesian ZOIB regression model in JAGS.

Image

Errors-in-variables models in stan

stan

Fitting a Bayesian regression with covariate uncertainty.

Image

R Markdown and my divorce from Microsoft Word

rants

A short description of the post.

Image

Animating the Metropolis algorithm

visualization
teaching

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

Image

Quantifying uncertainty around R-squared for generalized linear models

jags

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

Image

Clarifying vague interactions

visualization
rants

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

Image

Split violin plots

visualization

Comparing distributions with split violin plots in R.

Image

Bayesian model II regression in JAGS

jags

Fitting a regression model with uncertainty in the explanatory variable.

Image

Modeling habitat diversity and species richness

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

Image

Interactive two host SIR model

shiny
teaching

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

Image

Interactive stage-structured population model

teaching
shiny

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

Image

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 ...".