Blog Archives

Spatial data extraction around buffered points in R

November 8, 2014
By

Quantifying spatial data (e.g. land cover) around points can be done in a variety of ways, some of which require considerable amounts of patience, clicking around, and/or cash for a license. Here’s a bit of code that I cobbled together to quickly extract land cover data from the National Land Cover Database for buffered regions around points (e.g. small...

Read more »

Multilevel modeling of community composition with imperfect detection

June 19, 2014
By
Multilevel modeling of community composition with imperfect detection

This is a guest post generously provided by Joe Mihaljevic. A common goal of community ecology is to understand how and why species composition shifts across space. Common techniques to determine which environmental covariates might lead to such shifts typically rely on ordination of community data to reduce the amount of data. These techniques include redundancy analysis (RDA), canonical...

Read more »

Multilevel modeling of community composition with imperfect detection

June 19, 2014
By
Multilevel modeling of community composition with imperfect detection

This is a guest post generously provided by Joe Mihaljevic. A common goal of community ecology is to understand how and why species composition shifts across space. Common techniques to determine which environmental covariates might lead to such shifts typically rely on ordination of community data to reduce the amount of data. These techniques include redundancy analysis (RDA), canonical...

Read more »

Shiny variance inflation factor sandbox

April 30, 2014
By

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 that they can manipulate factors affecting the uncertainty in...

Read more »

Shiny variance inflation factor sandbox

April 30, 2014
By

In multiple regression, strong correlations 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 that they can manipulate factors affecting the uncertainty in slope terms...

Read more »

Stochastic search variable selection in JAGS

March 22, 2014
By
Stochastic search variable selection in JAGS

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. some of the covariates have no effect. Assume $\boldsymbol{\beta}$...

Read more »

Stochastic search variable selection in JAGS

March 22, 2014
By
Stochastic search variable selection in JAGS

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. some of the covariates have no effect. Assume $boldsymbol{beta}$ arises from...

Read more »

Better living through zero-one inflated beta regression

February 6, 2014
By
Better living through zero-one inflated beta regression

Dealing with proportion data on the interval $$ 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 the data (but shouldn’t; Warton and Hui 2011)....

Read more »

Better living through zero-one inflated beta regression

February 6, 2014
By
Better living through zero-one inflated beta regression

Dealing with proportion data on the interval $$ 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 the data (but shouldn’t; Warton and Hui 2011)....

Read more »

Errors-in-variables models in stan

November 27, 2013
By
Errors-in-variables models in stan

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 covariate measurement error using a latent-variable based errors-in-variables...

Read more »