# Data from DeWall et al., # "Tuning in to psychological change", # Psychology of Aesthetics, Creativity, and the Arts, 3/21/2011 # R by Cosma Shalizi cis <- matrix(c(2.62,11.14, 4.19,14.58, 4.90,12.33, 2.82,9.01, 5.12,9.91, 5.52,13.89, 3.78,13.13, 1.57,11.23, 6.19,11.66, 7.33,14.75, 3.02,10.15, 7.89,12.67, 6.10,13.15, 7.63,13.92, 9.11,16.54, 5.03,12.34, 5.98,14.52, 8.85,16.13, 5.66,13.55, 5.88,11.48, 4.68,13.08, 9.28,15.71, 7.09,13.68, 8.71,17.35, 6.55,10.90, 6.99,12.01, 4.81,9.89, 7.67,10.69),byrow=TRUE,ncol=2) yearmeans <- c(6.88, 9.39, 8.62, 5.92, 7.51, 9.70, 8.46, 6.40, 8.92, 11.04, 6.59, 10.28, 9.63, 10.78, 12.83, 8.69, 10.23, 12.49, 9.61, 8.68, 8.88, 12.50, 10.38, 13.03, 8.72, 9.50, 7.35, 9.18) stdevs <- c(5.95, 7.26, 5.19, 4.33, 3.35, 5.85, 6.54, 6.75, 3.82, 5.18, 4.98, 3.34, 4.93, 4.40, 5.19, 5.11, 5.97, 5.09, 5.52, 3.92, 5.87, 4.50, 4.61, 6.04, 3.04, 3.51, 3.55, 2.11) plot(1980:2007,yearmeans,ylim=c(0,max(cis)),type="b", xlab="Year", ylab="Percent Singular Pronoun", main="Data from DeWall et al. 2011, Table 1",pch=16) lines(1980:2007,cis[,1],lty=2) lines(1980:2007,cis[,2],lty=2) abline(h=mean(yearmeans),col="grey") lines(smooth.spline(x=(1980:2007),y=yearmeans),col="blue") lines(smooth.spline(x=(1980:2007),y=yearmeans,w=1/stdevs^2),col="purple")