Publications by Maxwell B. Joseph

Dynamic occupancy models in Stan

14.11.2014

Occupancy modeling is possible in Stan as shown here, despite the lack of support for integer parameters. In many Bayesian applications of occupancy modeling, the true occupancy states (0 or 1) are directly modeled, but this can be avoided by marginalizing out the true occupancy state. The Stan manual (pg. 96) gives an example of this kind of m...

2208 sym R (4301 sym/6 pcs) 2 img 3 tbl

Notes on shrinkage & prediction in hierarchical models

13.12.2014

Ecologists increasingly use mixed effects models, where some intercepts or slopes are fixed, and others are random (or varying). Often, confusion exists around whether and when to use fixed vs. random intercepts/slopes, which is understandable given their multiple definitions. In an attempt to help clarify the utility of varying intercept model...

1713 sym 4 img

Visualizing bivariate shrinkage

20.01.2015

Inspired by this post about visualizing shrinkage on Coppelia, and this thread about visualizing mixed models on Stack Exchange, I started thinking about how to visualize shrinkage in more than one dimension. One might find themselves in this situation with a varying slope, varying intercept hierarichical (mixed effects) model, a model with two v...

1118 sym R (2648 sym/2 pcs) 2 img 1 tbl

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

26.02.2015

Thanks to a nice post by Meghan Duffy on the Dynamic Ecology blog (How do you make figures?), we have some empirical evidence that many figures made in R by ecologists are secondarily edited in other programs including MS Powerpoint, Adobe Illustrator, Inkscape, and Photoshop. This may not be advisable* for two reasons: reproducibility and bonus...

2867 sym 2 img

Plotting spatial neighbors in ggmap

15.06.2015

The R package spdep has great utilities to define spatial neighbors (e.g. dnearneigh, knearneigh, with a nice vignette to boot), but the plotting functionality is aimed at base graphics. If you’re hoping to plot spatial neighborhoods as line segments in ggplot2, or ggmap, you’ll need the neighborhood data to be stored in a data frame. So, to ...

982 sym R (840 sym/1 pcs) 2 img

The IQUIT R video series

28.08.2015

I’ve uploaded 20+ R tutorials to YouTube for a new undergraduate course in Ecology and Evolutionary Biology at CU developed by Andrew Martin and Brett Melbourne, which in jocular anticipation was named IQUIT: an introduction to quantitative inference and thinking. We made the videos to address the most common R programming problems that arose f...

3872 sym

First year books

07.09.2015

I had to read a lot of books in graduate school. Some were life-changing, and others were forgettable. If I could bring a reading list back in time for my ‘first year’ graduate self, it would include the following: Bayesian Data Analysis Third Edition, by Andrew Gelman, John B. Carlin, Hal S. Stern, David B. Dunson, Aki Vehtari, and Donald B....

2759 sym 22 img

Maungawhau with a Gaussian process

22.10.2015

The Maungawhau volcano dataset is an R classic, often used to illustrate 3d plotting. Being on a Gaussian process kick lately, it seemed fun to try to interpolate the volcano elevation data using a subset of the full dataset as training data. Even with only 1% of the data, a squared exponential Gaussian process model does a decent job at estimati...

1056 sym 2 img

The five element ninjas approach to teaching design matrices

25.04.2016

Design matrices unite seemingly disparate statistical methods, including linear regression, ANOVA, multiple regression, ANCOVA, and generalized linear modeling. As part of a hierarchical Bayesian modeling course that we offered this semester, we wanted our students to learn about design matrices to facilitate model specification and parameter int...

4794 sym 4 img 1 tbl

Gaussian predictive process models in Stan

14.08.2016

Gaussian process (GP) models are computationally demanding for large datasets. Much work has been done to avoid expensive matrix operations that arise in parameter estimation with larger datasets via sparse and/or reduced rank covariance matrices (Datta et al. 2016 provide a nice review). What follows is an implementation of a spatial Gaussian pr...

4493 sym 4 img