Articles by Maxwell B. Joseph

Gaussian predictive process models in Stan

August 14, 2016 | Maxwell B. Joseph

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 ... [Read more...]

The five element ninjas approach to teaching design matrices

April 25, 2016 | Maxwell B. Joseph

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 interpretation. Naively, I thought ... [Read more...]

Maungawhau with a Gaussian process

October 22, 2015 | Maxwell B. Joseph

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... [Read more...]

First year books

September 7, 2015 | Maxwell B. Joseph

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, ... [Read more...]

The IQUIT R video series

August 28, 2015 | Maxwell B. Joseph

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 ... [Read more...]

Plotting spatial neighbors in ggmap

June 15, 2015 | Maxwell B. Joseph

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 ... [Read more...]

Visualizing bivariate shrinkage

January 20, 2015 | Maxwell B. Joseph

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 ... [Read more...]

Notes on shrinkage & prediction in hierarchical models

December 13, 2014 | Maxwell B. Joseph

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 ... [Read more...]

Dynamic occupancy models in Stan

November 14, 2014 | Maxwell B. Joseph

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 ... [Read more...]

Shiny variance inflation factor sandbox

April 30, 2014 | Maxwell B. Joseph

In multiple regression, strong correlation among covariates increases the uncertainty or variance in estimated regression coefficients. Variance inflation factors (VIFs) are one tool that has been used as an indicator of problematic covariate collinearity. In teaching students about VIFs, it may be useful to have some interactive supplementary material so ... [Read more...]

Stochastic search variable selection in JAGS

March 22, 2014 | Maxwell B. Joseph

Stochastic search variable selection (SSVS) identifies promising subsets of multiple regression covariates via Gibbs sampling (George and McCulloch 1993). Here’s a short SSVS demo with JAGS and R. Assume we have a multiple regression problem: We suspect only a subset of the elements of $\boldsymbol{\beta}$ are non-zero, i.e. ... [Read more...]

Better living through zero-one inflated beta regression

February 6, 2014 | Maxwell B. Joseph

Dealing with proportion data on the interval $[0, 1]$ is tricky. I realized this while trying to explain variation in vegetation cover. Unfortunately this is a true proportion, and can’t be made into a binary response. Further, true 0’s and 1’s rule out beta regression. You could arcsine square root transform ... [Read more...]

Errors-in-variables models in stan

November 27, 2013 | Maxwell B. Joseph

In a previous post, I gave a cursory overview of how prior information about covariate measurement error can reduce bias in linear regression. In the comments, Rasmus Bååth asked about estimation in the absence of strong priors. Here, I’ll describe a Bayesian approach for estimation and correction for ... [Read more...]

R and my divorce from Word

October 30, 2013 | Maxwell B. Joseph

Being in grad school, I do a lot of scholarly writing that requires associated or embedded R analyses, figures, and tables, plus bibliographies. Microsoft Word makes this unnecessarily difficult. Many tools are now available to break free from the tyranny of Word. The ones I like involve writing an article ... [Read more...]

How heavy is the Siberut macaque? A Bayesian phylogenetic approach

September 30, 2013 | Maxwell B. Joseph

Among-species comparisons can include phylogenetic information to account for non-independence arising from shared evolutionary history. Often, phylogenetic topologies and branch lengths are not known exactly, but are estimated with uncertainty. This uncertainty can be accounted for using methods recently described in a neat paper called Bayesian models for comparative analysis ... [Read more...]

Animating the Metropolis algorithm

September 8, 2013 | Maxwell B. Joseph

The Metropolis algorithm, and its generalization (Metropolis-Hastings algorithm) provide elegant methods for obtaining sequences of random samples from complex probability distributions. When I first read about modern MCMC methods, I had trouble visualizing the convergence of Markov chains in higher dimensional cases. So, I thought I might put together a ... [Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)