Blog Archives

Assessing significance of slopes in regression models with interaction

March 17, 2016
By
Assessing significance of slopes in regression models with interaction

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 Related Post

Read more »

Mastering R plot – Part 3: Outer margins

March 5, 2016
By
Mastering R plot – Part 3: Outer margins

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 0 Related Post

Read more »

First steps with Non-Linear Regression in R

February 25, 2016
By
First steps with Non-Linear Regression in R

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

Read more »

Mastering R plot – Part 2: Axis

February 6, 2016
By
Mastering R plot – Part 2: Axis

This is the second part of the Mastering R plot series. The standard plot function in R allows extensive tuning of every element being plotted. There are, however, many possible ways and the standard help file are hard to grasp at the beginning. In this article we will see how to control every aspects of

Read more »

Bayesian regression with STAN Part 2: Beyond normality

January 26, 2016
By
Bayesian regression with STAN Part 2: Beyond normality

In a previous post we saw how to perform bayesian regression in R using STAN for normally distributed data. In this post we will look at how to fit non-normal model in STAN using three example distributions commonly found in empirical data: negative-binomial (overdispersed poisson data), gamma (right-skewed continuous data) and beta-binomial (overdispersed binomial data).

Read more »

Mastering R Plot – Part 1: colors, legends and lines

January 19, 2016
By
Mastering R Plot – Part 1: colors, legends and lines

This is the first post of a series that will look at how to create graphics in R using the plot function from the base package. There are of course other packages to make cool graphs in R (like ggplot2 or lattice), but so far plot always gave me satisfaction. In this post we will

Read more »

Bayesian regression with STAN: Part 1 normal regression

January 8, 2016
By
Bayesian regression with STAN: Part 1 normal regression

This post will introduce you to bayesian regression in R, see the reference list at the end of the post for further information concerning this very broad topic. Bayesian regression Bayesian statistics turn around the Bayes theorem, which in a regression context is the following: $$ P(theta|Data) propto P(Data|theta) times P(theta) $$ Where (theta) is

Read more »

Bringing the powers of SQL into R

December 11, 2015
By
Bringing the powers of SQL into R

One of the big flaw of R is that data loaded into it are stored in the memory (on the RAM) and not on the disk. As you are working in an analysis with large (big) data the processing time of simple and more complex functions can become very long or even crash your computer.

Read more »

Standard deviation vs Standard error

December 4, 2015
By
Standard deviation vs Standard error

I got often asked (i.e. more than two times) by colleagues if they should plot/use the standard deviation or the standard error, here is a small post trying to clarify the meaning of these two metrics and when to use them with some R code example. Standard deviation Standard deviation is a measure of dispersion

Read more »

Introduction to bootstrap with applications to mixed-effect models

November 25, 2015
By
Introduction to bootstrap with applications to mixed-effect models

Bootstrap is one of the most famous resampling technique and is very useful to get confidence intervals in situations where classical approach (t- or z- tests) would fail. What is bootstrap Instead of writing down some equations let’s directly see how one may perform bootstrap. Below we will show a simple bootstrap example using the

Read more »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)