Blog Archives

Spatial autocorrelation of errors in JAGS

February 10, 2014
By
Spatial autocorrelation of errors in JAGS

In the core of kriging, Generalized-Least Squares (GLS) and geostatistics lies the multivariate normal (MVN) distribution – a generalization of normal distribution to two or more dimensions, with the option of having non-independent variances (i.e. autocorrelation). In this post I will show: (i) how to use exponential decay and the … Continue reading →

Read more »

Poisson regression fitted by glm(), maximum likelihood, and MCMC

October 29, 2013
By
Poisson regression fitted by glm(), maximum likelihood, and MCMC

The goal of this post is to demonstrate how a simple statistical model (Poisson log-linear regression) can be fitted using three different approaches. I want to demonstrate that both frequentists and Bayesians use the same models, and that it is the fitting procedure and the inference that differs. This is … Continue reading →

Read more »

The joy and martyrdom of trying to be a Bayesian

August 30, 2013
By

Some of my fellow scientists have it easy. They use predefined methods like linear regression and ANOVA to test simple hypotheses; they live in the innocent world of bivariate plots and lm(). Sometimes they notice that the data have odd histograms and they use glm(). The more educated ones use … Continue reading →

Read more »

Spatial correlograms in R: a mini overview

May 21, 2013
By
Spatial correlograms in R: a mini overview

Spatial correlograms are great to examine patterns of spatial autocorrelation in your data or model residuals. They show how correlated are pairs of spatial observations when you increase the distance (lag) between them - they are plots of some index…Read more →

Read more »

Beware: 2 is not always 2 in R

May 14, 2013
By

This post is minimalistic. Consider this: Now let's have look at what's inside x: But is it really true? Here you go. A colleague of mine was once ruined by this for an entire day before we realized what was…Read more →

Read more »

AIC & BIC vs. Crossvalidation

May 4, 2013
By
AIC & BIC vs. Crossvalidation

Model selection is a process of seeking the model in a set of candidate models that gives the best balance between model fit and complexity (Burnham & Anderson 2002). I have always used AIC for that. But you can also…Read more →

Read more »

Gridding data for multi-scale macroecological analyses

April 22, 2013
By
Gridding data for multi-scale macroecological analyses

These are materials for the first practical lesson of the Spatial Scale in Ecology course. All of the data and codes are available here. The class covered a 1.5h session. R code for the session is also at the end…Read more →

Read more »

Not all proportion data are binomial outcomes

March 24, 2013
By
Not all proportion data are binomial outcomes

It really is trivial. Not every proportion is frequency. There are things that have values  bounded between 0 and 1 and yet they are neither probabilities, nor frequencies. Why do I even bother to write this? Because some kinds of…Read more →

Read more »

Predictors, responses and residuals: What really needs to be normally distributed?

February 18, 2013
By
Predictors, responses and residuals: What really needs to be normally distributed?

Introduction Many scientists are concerned about normality or non-normality of variables in statistical analyses. The following and similar sentiments are often expressed, published or taught: "If you want to do statistics, then everything needs to be normally distributed." "We normalized…Read more →

Read more »

Data-driven science is a failure of imagination

January 2, 2013
By
Data-driven science is a failure of imagination

Professor Hans Rosling certainly is a remarkable figure. I recommend watching his performances. Especially the BBC's "Joy of Stats" is exemplary. Rosling sells passion for data, visual clarity and great deal of comedy. He represents the data-driven paradigm in science. What…Read more →

Read more »