R version 3.0.3 (2014-03-06) -- "Warm Puppy" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(29358,28673,30383,30988,32565,32510,31584,32729,34977,36710,39457,39217,40435,41373,43221,43271,43605,42254,41702,41002,39804,40256,40740,42362,41126,40225,41216,39148,41591,39506,35261,34148,33947,32819,32700,32242,32810,33865,32226,31077,31293,30236,30160,32436,30695,27525,26434,25739,25204,24977,24320,22680,22052,21467,21383,21777,21928,21814,22937,23595,20830) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Mean Plot (v1.0.4) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_meanplot.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as.numeric(par1) > (n <- length(x)) [1] 61 > (np <- floor(n / par1)) [1] 5 > arr <- array(NA,dim=c(par1,np+1)) > darr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > dx <- diff(x) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + darr[j,ari[j]] <- dx[i] + if (j == par1) j = 0 + } > ari [1] 6 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 29358 40435 41126 32810 25204 20830 [2,] 28673 41373 40225 33865 24977 NA [3,] 30383 43221 41216 32226 24320 NA [4,] 30988 43271 39148 31077 22680 NA [5,] 32565 43605 41591 31293 22052 NA [6,] 32510 42254 39506 30236 21467 NA [7,] 31584 41702 35261 30160 21383 NA [8,] 32729 41002 34148 32436 21777 NA [9,] 34977 39804 33947 30695 21928 NA [10,] 36710 40256 32819 27525 21814 NA [11,] 39457 40740 32700 26434 22937 NA [12,] 39217 42362 32242 25739 23595 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -685 938 -901 1055 -227 NA [2,] 1710 1848 991 -1639 -657 NA [3,] 605 50 -2068 -1149 -1640 NA [4,] 1577 334 2443 216 -628 NA [5,] -55 -1351 -2085 -1057 -585 NA [6,] -926 -552 -4245 -76 -84 NA [7,] 1145 -700 -1113 2276 394 NA [8,] 2248 -1198 -201 -1741 151 NA [9,] 1733 452 -1128 -3170 -114 NA [10,] 2747 484 -119 -1091 1123 NA [11,] -240 1622 -458 -695 658 NA [12,] 1218 -1236 568 -535 -2765 NA > arr.mean <- array(NA,dim=par1) > arr.median <- array(NA,dim=par1) > arr.midrange <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.mean[j] <- mean(arr[j,],na.rm=TRUE) + arr.median[j] <- median(arr[j,],na.rm=TRUE) + arr.midrange[j] <- (quantile(arr[j,],0.75,na.rm=TRUE) + quantile(arr[j,],0.25,na.rm=TRUE)) / 2 + } > overall.mean <- mean(x) > overall.median <- median(x) > overall.midrange <- (quantile(x,0.75) + quantile(x,0.25)) / 2 > postscript(file="/var/wessaorg/rcomp/tmp/1hfwr1395088806.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,type='b',ylab='mean',main='Mean Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.mean,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2viwf1395088806.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.median,type='b',ylab='median',main='Median Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.median,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/33hpw1395088806.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.midrange,type='b',ylab='midrange',main='Midrange Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.midrange,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/43hxk1395088806.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(arr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 20830 24977 24320 22680 22052 21467 30160 32436 30695 21814 22937 23595 [2,] 25204 28673 30383 30988 31293 30236 30160 32436 30695 27525 26434 25739 [3,] 31084 33865 32226 31077 32565 32510 31584 32729 33947 32819 32700 32242 [4,] 40435 40225 41216 39148 41591 39506 35261 34148 34977 36710 39457 39217 [5,] 41126 41373 43221 43271 43605 42254 41702 34148 39804 40256 40740 42362 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 21259.51 25702.39 24571.43 25311.16 25288.46 25959.84 27979.65 31519.31 [2,] 40908.49 42027.61 39880.57 36842.84 39841.54 39060.16 35188.35 33938.69 [,9] [,10] [,11] [,12] [1,] 30921.35 26328.9 23497.98 22718.48 [2,] 36972.65 39309.1 41902.02 41765.52 $out [1] 21383 41002 21777 21928 $group [1] 7 8 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(20830, 25204, 31084, 40435, 41126, 24977, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5rtwq1395088806.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(darr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Differenced Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] -901 -1639 -2068 -628 -2085 -926 -1113 -1741 -3170 -1091 -695 -2765 [2,] -685 -657 -1640 216 -1351 -926 -700 -1198 -1128 -119 -458 -1236 [3,] -227 991 -1149 334 -1057 -552 394 -201 -114 484 -240 -535 [4,] 938 1710 50 1577 -585 -84 1145 151 452 1123 658 568 [5,] 1055 1848 605 2443 -55 -76 2276 151 1733 2747 1622 1218 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1373.8077 -681.5162 -2343.14974 -627.6792 -1598.2537 -1146.95508 [2,] 919.8077 2663.5162 45.14974 1295.6792 -515.7463 42.95508 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -909.6724 -1154.2 -1230.424 -393.5941 -1028.5628 -1809.7019 [2,] 1697.6724 752.2 1002.424 1361.5941 548.5628 739.7019 $out [1] -4245 2248 $group [1] 6 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-901, -685, -227, 938, 1055, -1639, -657, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6rzjw1395088806.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(arr) > names(z) <- c(1:np) > (boxplot(z,notch=TRUE,col='grey',xlab='Block Index',ylab='Value',main='Notched Box Plots - Sequential Blocks')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [1,] 28673.0 39804.0 32242.0 25739.0 21383.0 20830 [2,] 30685.5 40587.5 33383.0 28842.5 21795.5 20830 [3,] 32537.5 41537.5 37204.5 30886.0 22366.0 20830 [4,] 35843.5 42791.5 40675.5 32331.0 23957.5 20830 [5,] 39457.0 43605.0 41591.0 33865.0 25204.0 20830 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 30184.9 40532.24 33878.34 29294.87 21379.9 20830 [2,] 34890.1 42542.76 40530.66 32477.13 23352.1 20830 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(28673, 30685.5, 32537.5, 35843.5, 39457, 39804, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7wa071395088806.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.mean,arr.median,arr.midrange)) > names(z) <- list('mean','median','midrange') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Central Tendency',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 31627.17 31077.0 32117.50 [2,] 32144.10 31905.0 32594.25 [3,] 32542.30 32537.5 33118.75 [4,] 33627.70 32774.0 34969.50 [5,] 34273.20 33947.0 36442.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 31865.62 32141.14 32035.38 [2,] 33218.98 32933.86 34202.12 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(31627.1666666667, 32144.1, 32542.3, 33627.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1hfwr1395088806.ps tmp/1hfwr1395088806.png",intern=TRUE)) character(0) > try(system("convert tmp/2viwf1395088806.ps tmp/2viwf1395088806.png",intern=TRUE)) character(0) > try(system("convert tmp/33hpw1395088806.ps tmp/33hpw1395088806.png",intern=TRUE)) character(0) > try(system("convert tmp/43hxk1395088806.ps tmp/43hxk1395088806.png",intern=TRUE)) character(0) > try(system("convert tmp/5rtwq1395088806.ps tmp/5rtwq1395088806.png",intern=TRUE)) character(0) > try(system("convert tmp/6rzjw1395088806.ps tmp/6rzjw1395088806.png",intern=TRUE)) character(0) > try(system("convert tmp/7wa071395088806.ps tmp/7wa071395088806.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.602 0.992 6.648