Blog Archives

Exploration of Functional Diversity indices using Shiny

April 27, 2015
By
Exploration of Functional Diversity indices using Shiny

Biological diversity (or biodiversity) is a complex concept with many different aspects in it, like species richness, evenness or functional redundancy. My field of research focus on understanding the effect of changing plant diversity on higher trophic levels communities but also ecosystem function. Even if the founding papers of this area of research already hypothesized

Read more »

A function to help graphical model checks of lm and ANOVA

March 25, 2015
By
A function to help graphical model checks of lm and ANOVA

As always a more colourful version of this post is available on rpubs. Even if LM are very simple models at the basis of many more complex ones, LM still have some assumptions that if not met would render any interpretation from the models plainly wrong. In my field of research most people were taught

Read more »

Generating ANOVA-like table from GLMM using parametric bootstrap

February 26, 2015
By
Generating ANOVA-like table from GLMM using parametric bootstrap

This article may also be found on RPubs: http://rpubs.com/hughes/63269 In the list of worst to best way to test for effect in GLMM the list on http://glmm.wikidot.com/faq state that parametric bootstrapping is among the best options. PBmodcomp in the pbkrtest package implement such parametric bootstrapping by comparing a full model to a null one. The

Read more »

Using and interpreting different contrasts in linear models in R

January 13, 2015
By
Using and interpreting different contrasts in linear models in R

When building a regression model with categorical variables with more than two levels (ie “Cold”, “Freezing”, “Warm”) R is doing internally some transformation to be able to compute regression coefficient. What R is doing is that it is turning your categorical variables into a set of contrasts, this number of contrasts is the number of

Read more »

Interpreting regression coefficient in R

November 23, 2014
By
Interpreting regression coefficient in R

Linear models are a very simple statistical techniques and is often (if not always) a useful start for more complex analysis. It is however not so straightforward to understand what the regression coefficient means even in the most simple case when there are no interactions in the model. If we are not only fishing for

Read more »

DataFrame manipulation in R from basics to dplyr

October 11, 2014
By
DataFrame manipulation in R from basics to dplyr

  In my surroundings at work I see quite a few people managing their data in spreadsheet software like Excel or Calc, these software will do the work but I usually tend to do as little data manipulation in them as possible and to turn as soon as possible my spreadsheets into csv files and

Read more »

Ploting SEMs in R using semPlot

August 10, 2014
By
Ploting SEMs in R using semPlot

This is a short post presenting the great package semPlot developed by Sacha Epskamp (check out his nice website: http://sachaepskamp.com/) to make nice plots from your SEMs. SEMs are a modelling tool that allow the researcher to investiguate complex relationships between the variables, you may find here many links to free tutorials: http://www.structuralequations.org/. Here I

Read more »

Using bootMer to do model comparison in R

July 13, 2014
By
Using bootMer to do model comparison in R

Setting the right random effect part in mixed effect models can be tricky in many applied situation. I will not talk here about choosing wether a grouping variable (sites, individuals …) should be included as a fixed term or as a random term, please see Gelman and Hill (2006) and Zuur et al (2009) for

Read more »

Regular expression and associated functions in R

June 1, 2014
By
Regular expression and associated functions in R

When working with strings regular expressions are an extremely powerful tool to look for specific patterns in the strings. In informatics a string is several characters put together, this can be words, sentences, or DNA code. Regular expression were developed for the language of Perl (http://www.perl.org/) and have been since then implemented in various other

Read more »

Importing 100 years of climate change into R

May 5, 2014
By
Importing 100 years of climate change into R

This is a flashback post, I was working on species distribution shifts over the last 40 years last summer and recently Rémi Genevest contacted me asking me how I managed to import the CRU TS 1.2 dataset into R. As always a more readable version of the code can be found here. At that time I

Read more »