Simulation

How to interpret and report nonlinear effects from Generalized Additive Models

Generalized additive models (GAMs) are incredibly flexible tools that fit penalized regression splines to data. But interpreting nonlinear effects from GAMs is not as easy as interpreting linear models. In this post I provide 3 simple steps to help you understand and interpret nonlinear effects from GAMs using the mgcv R package.

Using Stan for logistic regressions with detection error

Example of how to simulate binary observations of an imperfectly observed data generating process (i.e. binary measurements that are made with error) and use Stan to estimate parameters of the model in a Bayesian framework.

Phylogenetic smoothing using mgcv

Use species’ phylogenetic or functional relationships to inform and partially pool hierarchical, nonlinear smooth functions in Generalized Additive Models with mgcv

Using Stan to model geostatistical count data with distance matrices

Switching to spatial regression modeling, I here show how to simulate discrete observations over a latent Gaussian Process spatial autocorrelation function. I then demonstrate how to use Stan to estimate parameters of the model using a spatial distance matrix as input.