Publications by Lionel Hertzog

First steps with Non-Linear Regression in R

25.02.2016

Drawing a line through a cloud of point (ie doing a linear regression) is the most basic analysis one may do. It is sometime fitting well to the data, but in some (many) situations, the relationships between variables are not linear. In this case one may follow three different ways: (i) try to linearize the relationship by transforming the data, ...

4028 sym R (2586 sym/5 pcs) 12 img

Mastering R plot – Part 3: Outer margins

05.03.2016

This is the third post in our series Mastering R Plot, in this one we will cover the outer margins. To know more about plot customization read my first and second post. Let’s directly dive into some code: #a plot has inner and outer margins #by default there is no outer margins par()$oma [1] 0 0 0 0 #but we can add some op<-par(no.readonly=TR...

2360 sym R (2040 sym/4 pcs) 14 img

Assessing significance of slopes in regression models with interaction

17.03.2016

This is a pretty short post on an issue that popped at some point in the past, at that time I found a way around it but as it arose again recently I decided to go through it. The issue I had was that when modeling an interaction between a continuous (say temperature) and a categorical variables (say site ID), we get the slope for the first level ...

2595 sym R (1554 sym/3 pcs) 8 img

Second step with non-linear regression: adding predictors

19.06.2017

In this post we will see how to include the effect of predictors in non-linear regressions. In other words, letting the parameters of non-linear regressions vary according to some explanatory variables (or predictors). Be sure to check the first post on this if you are new to non-linear regressions. The example that I will use throughout this pos...

5468 sym R (4058 sym/6 pcs) 6 img

K-fold cross-validation in Stan

30.07.2018

Comparing multiple models is one of the core but also one of the trickiest element of data analysis. Under a Bayesian framework the loo package in R allows you to derive (among other things) leave-one-out cross-validation metrics to compare the predictive abilities of different models. Cross-validation is basically: (i) separating the data into ...

6577 sym R (6158 sym/6 pcs)

Spatial regression in R part 1: spaMM vs glmmTMB

02.09.2019

Are you interested in guest posting? Publish at DataScience+ via your editor (i.e., RStudio).CategoryAdvanced ModelingTagsData VisualisationGLMMLogistic RegressionR Programmingspatial modelMany datasets these days are collected at different locations over space which may generate spatial dependence. Spatial dependence (observation close together...

10222 sym R (10663 sym/17 pcs) 22 img

With great powers come great responsibilities: model checks in Bayesian data analysis

09.04.2020

Are you interested in guest posting? Publish at DataScience+ via your RStudio editor.CategoryAdvanced ModelingTagsBayesian AnalysisMultiple RegressionR ProgrammingAfter months of collecting your data, after weeks of formatting it to the required format, after days of getting drown in the vast diversity of models available out there and choosing ...

10971 sym R (3746 sym/20 pcs) 18 img

Spatial regression in R part 2: INLA

24.06.2020

Are you interested in guest posting? Publish at DataScience+ via your RStudio editor.CategoryAdvanced ModelingTagsData VisualisationR ProgrammingspatialTen months after part 1 of spatial regression in R (oh my gosh where did these months go?), here is a (hopefully long-awaited) second part this time using INLA, a package that is handy in many si...

10487 sym R (6917 sym/13 pcs) 6 img

R as GIS, part 1: vector

04.11.2020

Are you interested in guest posting? Publish at DataScience+ via your RStudio editor.CategoryData ManagementTagsData VisualisationMapsR ProgrammingTips & TricksWorking with spatial data is becoming more and more frequent with the development of geoportals providing free access to large number of spatial datasets. Geographic Information System s...

8832 sym R (12947 sym/16 pcs) 8 img