Plotting individual means (and CI) for each participant and condition

Imagine that we have an experiment in which participants do two different tasks (type a and b) and are assigned to two different conditions (A and B). So we want to know how fast they are in each type of stimuli and task. As we have few participants we can explore individual estimates. Below are listed some things that we want to handle on our visualization. Differences in type of…

Plotting GLMER effects with afex, emmeans in ggplot2 and base R

In previous posts I made some graphs in pure base R for Generalized Linear Mixed Effect Model, but there are new packages that worth to check. So I updated my codes and taking advantage of the opportunity I re-draw my plots in ggplot2. I really love the elegance and craftness of base R graphics, but sometimes ggplot2 is easier to share with collaborators and more undesrtandable. So, below is the…

Cleaning (and plotting) reaction times.

Hi all. I’m starting a new series of post in which I will show the tedious operations that I’ve programmed in my everyday job at the psychology lab. I’m not starting from the bottom (get the data, etc)… But my plan is cover all the process and share the code to try to make the life easier for the community : ) FULL CODE AT GITHUB

Plotting model estimates in base R graphics

There are many ways of displaying data and graphs in R, here I propose a base graph solution to plot estimates and confidence intervals using a Generalized Linear Mixed Effect Model, but this code could be used for other kind of models. So, we have a Generalized Linear Effect Model and we want to plot the model estimates and its confidence interval. First we install needed packages and generate some…

Plotting Histograms with Density Plots in R (ggplot2)

Last week I needed to plot some distributions of means of proportions of correct answers of a experiment.  As all we hate bar charts,  we must favour plots that show the data variability. I decided to make a histogram with density plot and mean. First I simulated a dataset in long format (each row is an observation), which are the ones that I regularly use then I make the plot….