A while ago I wrote a co-wrote chapter for an introductory psychology text book Essential Psychology: A Concise Introduction. This is a book edited and written by members of the department where I work. My contribution was the chapter on human memory (cunningly titled Memory).

I produced several plots for the chapter (some of which got cut due to severe space restrictions). One that stayed in was a serial position curve. For this plot I used data from Postman and Phillips (1965).

I feel particular proud of this plot because I was just beginning to use and learn R at the time (as opposed to dabbling) and because I had had a really hard time getting hold of the data. I first tried google, but had no joy (for some reason I thought someone would have put the raw data online, as it is a classic study - though maybe I just missed it). Then I searched for alternative data sets  (as around that period there were quite a few similar studies). I was probably being too picky, but whatever the reason I had no luck.

It would have been trivial to make up fake data, but that didn't feel right. What I eventually did (and wished I'd done straight away) was print out the original figure and measure all the points by hand. I then entered these values into a spreadsheet and tweaked and remeasured until all the summary statistics matched those in the original paper to about one decimal place. This was a lot quicker than I had thought. I cheated slightly because I only needed data from the 20 word conditions (so I could leave out the 10 and 30 word conditions).

(I'm pretty sure I could have used computer software to capture the raw data from an image file, but I'd have had to find the software, learn how to use it and do all the checking anyway. For a single figure I'm reasonably sure measuring by hand would be faster.)

In re-plotting it I noticed a few things that I hadn't paid much attention to before. The main one was the authors report frequency of recalls for 18 participants with 6 lists each. This means all scores are out of 108 and I suspect lots of casual readers would (like me) assume they were percentages. For re-plotting I rescaled the data as percentages.

The plot itself just uses basic R functions. I'm writing about it because:  i) I think it is a fairly clear illustration of how basic plot functions in R can produce what I think is a rather nice Figure. (The published version has been edited by the publisher, adding colour and making the style match figures in other chapters), ii) people may find it useful for teaching purposes. So please feel free to use and adapt the R code for non-commercial (e.g., teaching use).

First load the data from this .csv file (you will need to specify the path or change the working directory if the file is saved elsewhere).

pp65 <- read.csv("pp65.csv")

Then paste the following:

plot(pp65$SP, pch=NA, ylim=c(0,80), xlab= "Serial position", ylab= "Mean percentage recall", main = "Postman & Phillips (1965)", sub = '(20 word conditions only)')

points(pp65$C0, pch=19, col='black', cex=.7)
lines(pp65$C0, lty=3)
points(pp65$C15, pch=24, col='black', cex=.7)
lines(pp65$C15, lty=2)
points(pp65$C30, pch=22, col='black', cex=.7)
lines(pp65$C30, lty=5)
legend(3, 80, legend=c("No delay","15 second delay","30 second delay"), lty=c(3,2,5))

If you are new to R you can find out more about these plotting functions by using R help: ?par, ?plot, ?points and so on ...


References

Baguley, T., & Edmonds, A. J. (2010). Memory. In P. Banyard, M. N. O. Davies, C. Norman, & B. Winder (Eds.) Essential Psychology: A Concise Introduction (pp. 65-82). London: Sage.





Postman, L. & Philips, L. W. (1965). Short-term temporal changes in free recall. Quarterly Journal of Experimental Psychology, 17, 132-138.


0

Add a comment

I Will Not Ever, NEVER Run a MANOVA
I Will Not Ever, NEVER Run a MANOVA
2
A brief introduction to logistic regression
A brief introduction to logistic regression
Serious Stats: Obtaining CIs for Spearman's rho or Kendall's tau
Serious Stats: Obtaining CIs for Spearman's rho or Kendall's tau
Serious stats: Type II versus Type III Sums of Squares
Serious stats: Type II versus Type III Sums of Squares
Egon Pearson correction for Chi-Square
Egon Pearson correction for Chi-Square
Provisional programme: ESRC funded conference: Bayesian Data Analysis in the Social Sciences Curriculum (Nottingham, UK 29th Sept 2017)
Provisional programme: ESRC funded conference: Bayesian Data Analysis in the Social Sciences Curriculum (Nottingham, UK 29th Sept 2017)
STOP PRESS Introductory Bayesian data analysis workshops for social scientists (June 2017 Nottingham UK)
STOP PRESS Introductory Bayesian data analysis workshops for social scientists (June 2017 Nottingham UK)
Serious Stats blog: CI for differences in independent R square coefficients
Serious Stats blog: CI for differences in independent R square coefficients
1
ESRC funded Bayesian data analysis workshops for social scientists
ESRC funded Bayesian data analysis workshops for social scientists
Multicollinearity and collinearity (in multiple regression) - a tutorial
Multicollinearity and collinearity (in multiple regression) - a tutorial
1
Cronbach to the future
Cronbach to the future
Why faking data is bad ...
Why faking data is bad ...
Serious stats: using multilevel models to get accurate inferences for repeated measures ANOVA
Serious stats: using multilevel models to get accurate inferences for repeated measures ANOVA
Neuroscience, statistical power and how to increase it
Neuroscience, statistical power and how to increase it
The growth of Bayesian methods in psychology
The growth of Bayesian methods in psychology
Guest post: Visualizing data using a 3D printer
Yet more on p values ...
Yet more on p values ...
Serious stats book officially published
Serious stats book officially published
p values, the cliff effect and the nature of evidence
The stimuli-as-fixed-effect fallacy
The stimuli-as-fixed-effect fallacy
The aesthetics of error bars
Serious stats - free statistics resources
Serious stats - free statistics resources
Graphing between-subject confidence intervals for ANOVA
Graphing between-subject confidence intervals for ANOVA
p curves revisited
p curves revisited
R code for p curves
R code for p curves
Simulating p curves and detecting dodgy stats
On nonparametric statistics ...
On nonparametric statistics ...
Comparing correlations update
Comparing correlations update
Serious Stats book and blog update
Serious Stats book and blog update
More on "A problem of significance"
More on "A problem of significance"
Calculating and graphing within-subject confidence intervals for ANOVA
Calculating and graphing within-subject confidence intervals for ANOVA
A problem of significance
A problem of significance
R: An introduction for psychologists
R: An introduction for psychologists
Introduction to using R in research
Introduction to using R in research
Example of plotting a serial position curve in R
Interaction plot from cell means
When correlations go bad ... (Or, I always wanted to write about the Society for the Suppression of the Correlation Coefficient)
When correlations go bad ... (Or, I always wanted to write about the Society for the Suppression of the Correlation Coefficient)
Strathclyde multilevel modeling talk
Strathclyde multilevel modeling talk
A statistical puzzle about averages II
A statistical puzzle about averages II
A statistical puzzle about averages I
A statistical puzzle about averages I
R functions for Dienes (2008) Understanding Psychology as a Science
R functions for Dienes (2008) Understanding Psychology as a Science
Chi-square test of independence and the odds ratio
Chi-square test of independence and the odds ratio
Don't standardize interaction/moderator effects in multiple regression
Don't standardize interaction/moderator effects in multiple regression
R resources for psychologists
R resources for psychologists
Simulating data for inquiry based learning
Simulating data for inquiry based learning
Beyond ANOVA: from repeated measures to multilevel models
Beyond ANOVA: from repeated measures to multilevel models
An introduction to moderated multiple regression
An introduction to moderated multiple regression
How to calculate simple main effects using generic ANOVA software
How to calculate simple main effects using generic ANOVA software
What is all this stuff about sphericity in my repeated measures ANOVA output?
What is all this stuff about sphericity in my repeated measures ANOVA output?
What is a psychological statistics blog?
What is a psychological statistics blog?
Links
Blog Archive
Subscribe
Subscribe
About Me
About Me
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.