Adding group-level predictors in GLMM using lme4

Sometime I happen to be wrong, this is one of these instance. The issue: a colleague measured individual plant growth and measured light irradiation received by each individual, the plants where in groups of 10 individuals and he measured soil parameters at the group-level. To analyze the effect of light on plant growth while controlling … Continue reading Adding group-level predictors in GLMM using lme4

Simulating SEMs for piecewiseSEM: part 1 the basics

Structural Equation Models are being used more and more frequently by ecologists due to the appeal of linking variables together in complex web of interactions. There are currently two main libraries in R to fit such models: lavaan and piecewiseSEM. The aim of this post is not to discuss the advantages and drawbacks of these … Continue reading Simulating SEMs for piecewiseSEM: part 1 the basics

How not to control for multiple testing

While reading the method section of a recent article by Solivares et al, I came upon the following paragraph: "The inclusion of many predictors in statistical models increases the chance of type I error (false positives). To account for this we used a Bernoulli process to detect false discovery rates, where the probability (P) of … Continue reading How not to control for multiple testing

Interpreting random effects in linear mixed-effect models

Recently I had more and more trouble to find topics for stats-orientated posts, fortunately a recent question from a reader gave me the idea for this one. In this post I will explain how to interpret the random effects from linear mixed-effect models fitted with lmer (package lme4). For more informations on these models you … Continue reading Interpreting random effects in linear mixed-effect models

Making a case for hierarchical generalized models

Science is also about convincing others, be it your supervisors or your collaborators, that what you intend to do is relevant to get the answers sought. This “what” can be anything from designing an experiment, to collecting samples or formatting the data. This post was inspired by a recent discussion with one of my supervisor … Continue reading Making a case for hierarchical generalized models

Tendances des élections présidentielles francaises des 50 dernières années

[An english version for this article is available here] Cette année (2017) les Français seront appelés à élire leur prochain président au mois d'avril. Il y a quelque temps j'ai découvert le site open data du gouvernement français où sont publiés de nombreux jeux de données publiques et où tout un chacun est invité à … Continue reading Tendances des élections présidentielles francaises des 50 dernières années

Patterns across 50 years of French presidential election

[Une version francaise de cette article est disponible ici] This year (2017) we will have our presidential election between April and May in France. A while ago I discovered the open data website of the French government publishing public data with free access and promoting utilization by anyone. So in this post I will explore … Continue reading Patterns across 50 years of French presidential election