As a scientist, what should I do when I encounter a seemingly fundamental problem that also seems strangely unfamiliar? Is it unfamiliar because I am up to something really new, or am I re-discovering something that has been around for centuries, and I have just missed it? This is a … Continue reading

## Tailoring univariate probability distributions

This post shows how to build a custom univariate distribution in R from scratch, so that you end up with the essential functions: a probability density function, cumulative distribution function, quantile function and random number generator. In the beginning all you need is an equation of the probability density function, … Continue reading

## A suggestion to Windows-based users of R: It may be time to relocate

Do you remember the time when you switched from graphical statistical software to R? I did it eight years ago, and I had hard time doing even a simple regression analysis without constantly searching for help, it was a pain. In desperation I frequently cheated and went back to Statistica … Continue reading

## Our results will be relevant for policy and decision-making and biodiversity management

I used to be involved in a large EU-funded collaborative project. It gave me an opportunity to do fun basic science, and also an opportunity to see the kind of lingo that is used in order to get a big EU project funded. The project promised: "Our results will be … Continue reading

## Would you save the young or the ancient species?

Yesterday I gave a seminar at John Harte's lab at UC Berkeley. It was a joy. There must be something in the lush Californian climate that makes people nice. During the discussion John Harte and Andy Rominger jointly pointed me to a problem: Imagine that you have two species. The … Continue reading

## Do 'macrosystems ecologists' know about macroecology?

Paper by Levy et al. in Frontiers in Ecology and the Environment announces emergence of a new ecological discipline called macrosystems ecology (MSE). The authors define MSE like this: MSE studies explore how broad-scale variation in fine-scale characteristics – such as organismal behavior and fitness, nutrient transformations, and water-use efficiency … Continue reading

## 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

## Bayesian Biostatistics

This post contains materials for Bayesian stats course that I taught between 2-4 Feb 2014 at Faculty of Science, Charles University, Prague, Czech Republic. There were around 40 participants. The complete materials and their source codes (Markdown and R) are on a GitHub repository. The lectures can also be accessed … Continue reading

## 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

## Making high-resolution biodiversity maps from low-res maps

This post advertises our new Ecological Applications paper which is in press. Imagine that there would be a tool that could make hi-res images out of low-res ones, just like this: Such tool would be really useful for creating maps of things for which we only have a very crude … Continue reading

## Do simple models lead to generality in ecology? Opinion of a simpleton

Evans et al. have a paper in Trends in Ecology and Evolution with this abstract: Modellers of biological, ecological, and environmental systems cannot take for granted the maxim ‘simple means general means good’. We argue here that viewing simple models as the main way to achieve generality may be an … Continue reading

## The joy and martyrdom of trying to be a Bayesian

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

## The effect of ski-pistes on butterflies

I have a weak spot for butterflies, and I love skiing. Every time I go up a ski lift I wonder how such a major landscape modification (ski pistes or ski slopes) affects nature. I have always had the impression that clear-cutting long and wide strips in mountain forests is … Continue reading

## Is basic science infantile?

Time has an article on what happens when creative thinkers get the opportunity to set their minds free. The article begins at the Institute for Advanced Study in Princeton and ends up as an essay on the old "rivalry" between basic and applied science. Opinions of two of the Institute's … Continue reading

## Flawed study: Global patterns of terrestrial vertebrate diversity and conservation

Recently, a paper by C. N. Jenkins, S. L. Pimm and L.N. Joppa called "Global patterns of terrestrial vertebrate diversity and conservation" appeared in PNAS. The authors claim that they have refined global map of priority conservation areas to a grid of 10 km x 10 km resolution. They call … Continue reading