Publications by grumble10

Checking (G)LM model assumptions in R

16.04.2014

(Generalized) Linear models make some strong assumptions concerning the data structure: Independance of each data points Correct distribution of the residuals Correct specification of the variance structure Linear relationship between the response and the linear predictor For simple lm 2-4) means that the residuals should be normally distribute...

4116 sym R (1488 sym/4 pcs) 24 img

Importing 100 years of climate change into R

05.05.2014

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 used a not very elegant coding involving SpatialPixels ...

1911 sym R (2003 sym/2 pcs) 20 img

Regular expression and associated functions in R

01.06.2014

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

2466 sym R (2939 sym/4 pcs) 16 img

Using bootMer to do model comparison in R

13.07.2014

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 informations. Here I will present the use o...

3421 sym R (3131 sym/2 pcs) 16 img

Ploting SEMs in R using semPlot

10.08.2014

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.s...

2139 sym R (1468 sym/4 pcs) 22 img

DataFrame manipulation in R from basics to dplyr

11.10.2014

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 then bring the data to R where every single manipulation I d...

3585 sym R (4035 sym/3 pcs) 20 img

Interpreting regression coefficient in R

23.11.2014

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 stars (ie only interested if...

5141 sym R (4019 sym/6 pcs) 22 img

Using and interpreting different contrasts in linear models in R

13.01.2015

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 o...

4559 sym R (4259 sym/6 pcs) 20 img

Generating ANOVA-like table from GLMM using parametric bootstrap

26.02.2015

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

3164 sym R (4507 sym/3 pcs) 16 img

A function to help graphical model checks of lm and ANOVA

25.03.2015

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 about checking ANOVA assumptions using tests ...

2239 sym R (1467 sym/3 pcs) 20 img