Just a note
# input data g1t1=c(43,41,44,47) # Group 1, time-period 1 g1t2=c(15,19,27,26) # Group 1, time-period 2 g2t1=c(21,25,23,30) # Group 2, time-period 1 g2t2=c(33,39,41,40) # Group 2, time-period 2 n1=length(g1t1); n2=length(g2t1) t1=rep(1,n1); t2=rep(2,n2) range=range(g1t1,g1t2,g2t1,g2t2) ylab='Pain score (mm)' par(mfrow=c(2,2), lab=c(1,5,7)) plot(t1, g1t1, xlim=c(1,2), col='magenta', ylim=range, xlab='time', ylab=ylab, main='Group 1 scores') points(t2, g1t2, col='green') segments(t1,g1t1,t2,g1t2) plot(t1, g2t1, xlim=c(1,2), col='green', ylim=range, xlab='time', ylab=ylab, main='Group 2 scores') points(t2, g2t2, col='magenta') segments(t1,g2t1,t2,g2t2) plot(c(1,2), c(mean(g1t1),mean(g2t2)), col='magenta', ylim=range, xlab='time', ylab=ylab, main='Mean scores') points(c(1,2), c(mean(g2t1),mean(g1t2)), col='green') segments(c(1,1), c(mean(g1t1),mean(g2t1)), c(2,2), c(mean(g2t2),mean(g1t2)), col=c('magenta','green')) par(mfrow=c(1,1), lab=c(5,5,7))
Except where otherwise specified, all text and images on this page are copyright InfluentialPoints, all rights reserved. Images not copyright InfluentialPoints credit their source on web-pages attached via hypertext links from those images.