R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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(209704.00 + ,208923.00 + ,208131.00 + ,206492.00 + ,222706.00 + ,221848.00 + ,209704.00 + ,201630.00 + ,202411.00 + ,202411.00 + ,203280.00 + ,204842.00 + ,207273.00 + ,207273.00 + ,205711.00 + ,201630.00 + ,222706.00 + ,225918.00 + ,221067.00 + ,209704.00 + ,214566.00 + ,207273.00 + ,210562.00 + ,212135.00 + ,213774.00 + ,209704.00 + ,210562.00 + ,204842.00 + ,222706.00 + ,228349.00 + ,223498.00 + ,214566.00 + ,224279.00 + ,213774.00 + ,223498.00 + ,222706.00 + ,225137.00 + ,216205.00 + ,225918.00 + ,225137.00 + ,239712.00 + ,236423.00 + ,223498.00 + ,216986.00 + ,225918.00 + ,213774.00 + ,222706.00 + ,224279.00 + ,227568.00 + ,220286.00 + ,224279.00 + ,226710.00 + ,235642.00 + ,228349.00 + ,218636.00 + ,208131.00 + ,217855.00 + ,191125.00 + ,204061.00 + ,211343.00 + ,218636.00 + ,208131.00 + ,208131.00 + ,208131.00 + ,213774.00 + ,205711.00 + ,195129.00 + ,186274.00 + ,192698.00 + ,167618.00 + ,182985.00 + ,191917.00 + ,193556.00 + ,184624.00 + ,185405.00 + ,182985.00 + ,191125.00 + ,185405.00 + ,174130.00 + ,165979.00 + ,179762.00 + ,149831.00 + ,169268.00 + ,178123.00 + ,178123.00 + ,167618.00 + ,157905.00 + ,157124.00 + ,165979.00 + ,157905.00 + ,142549.00 + ,131967.00 + ,143330.00 + ,116611.00 + ,140899.00 + ,153824.00 + ,157905.00 + ,148973.00 + ,137687.00 + ,145761.00 + ,148973.00 + ,146542.00 + ,122243.00 + ,110968.00 + ,119031.00 + ,94743.00 + ,119823.00 + ,128755.00 + ,136037.00 + ,123893.00 + ,112530.00 + ,119031.00 + ,122243.00 + ,115819.00 + ,91531.00 + ,80949.00 + ,90662.00 + ,63943.00 + ,93093.00 + ,110968.00) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 209704 207273 213774 225137 227568 218636 193556 178123 157905 136037 [2,] 208923 207273 209704 216205 220286 208131 184624 167618 148973 123893 [3,] 208131 205711 210562 225918 224279 208131 185405 157905 137687 112530 [4,] 206492 201630 204842 225137 226710 208131 182985 157124 145761 119031 [5,] 222706 222706 222706 239712 235642 213774 191125 165979 148973 122243 [6,] 221848 225918 228349 236423 228349 205711 185405 157905 146542 115819 [7,] 209704 221067 223498 223498 218636 195129 174130 142549 122243 91531 [8,] 201630 209704 214566 216986 208131 186274 165979 131967 110968 80949 [9,] 202411 214566 224279 225918 217855 192698 179762 143330 119031 90662 [10,] 202411 207273 213774 213774 191125 167618 149831 116611 94743 63943 [11,] 203280 210562 223498 222706 204061 182985 169268 140899 119823 93093 [12,] 204842 212135 222706 224279 211343 191917 178123 153824 128755 110968 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] -781 0 -4070 -8932 -7282 -10505 -8932 -10505 -8932 -12144 [2,] -792 -1562 858 9713 3993 0 781 -9713 -11286 -11363 [3,] -1639 -4081 -5720 -781 2431 0 -2420 -781 8074 6501 [4,] 16214 21076 17864 14575 8932 5643 8140 8855 3212 3212 [5,] -858 3212 5643 -3289 -7293 -8063 -5720 -8074 -2431 -6424 [6,] -12144 -4851 -4851 -12925 -9713 -10582 -11275 -15356 -24299 -24288 [7,] -8074 -11363 -8932 -6512 -10505 -8855 -8151 -10582 -11275 -10582 [8,] 781 4862 9713 8932 9724 6424 13783 11363 8063 9713 [9,] 0 -7293 -10505 -12144 -26730 -25080 -29931 -26719 -24288 -26719 [10,] 869 3289 9724 8932 12936 15367 19437 24288 25080 29150 [11,] 1562 1573 -792 1573 7282 8932 8855 12925 8932 17875 [12,] 2431 1639 2431 3289 7293 1639 0 4081 7282 NA [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/1cc7y1439463151.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/2eu7p1439463151.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/3tiqs1439463151.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/45ome1439463151.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] [1,] 136037.0 123893 112530 119031 122243 115819.0 91531.0 80949 90662.0 [2,] 178123.0 167618 157905 157124 165979 157905.0 142549.0 131967 143330.0 [3,] 208488.5 207702 206921 203236 218240 213779.5 202416.5 193952 197554.5 [4,] 218636.0 209704 210562 208131 222706 228349.0 221067.0 209704 217855.0 [5,] 227568.0 220286 225918 226710 239712 236423.0 223498.0 216986 225918.0 [,10] [,11] [,12] [1,] 63943.0 93093.0 110968.0 [2,] 116611.0 140899.0 153824.0 [3,] 179371.5 193132.5 198379.5 [4,] 207273.0 210562.0 212135.0 [5,] 213774.0 223498.0 224279.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 188246.6 186674.2 180611.5 177750.9 189896.9 178582.9 163185.8 155111.5 [2,] 228730.4 228729.8 233230.5 228721.1 246583.1 248976.1 241647.2 232792.5 [,9] [,10] [,11] [,12] [1,] 160318.8 134073.2 158326.1 169245 [2,] 234790.2 224669.8 227938.9 227514 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(136037, 178123, 208488.5, 218636, 227568, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5j4tr1439463151.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] [1,] -12144 -11363 -5720 3212.0 -8074.0 -15356.0 -11363.0 4862.0 -29931 [2,] -10505 -9713 -2420 5643.0 -7293.0 -15356.0 -10582.0 6424.0 -26719 [3,] -8932 -396 -781 8893.5 -4504.5 -11709.5 -9718.5 9322.5 -24684 [4,] -4070 858 2431 16214.0 -858.0 -9713.0 -8151.0 9724.0 -10505 [5,] 0 9713 8074 21076.0 5643.0 -4851.0 -6512.0 13783.0 0 [,10] [,11] [,12] [1,] 869.0 -792.0 0 [2,] 8932.0 1573.0 1639 [3,] 14151.5 8068.5 2431 [4,] 24288.0 8932.0 4081 [5,] 29150.0 17875.0 7293 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -12147.183 -5677.693 -3204.753 3611.807 -7719.683 -14528.968 -10933.125 [2,] -5716.817 4885.693 1642.753 14175.193 -1289.317 -8890.032 -8503.875 [,8] [,9] [,10] [,11] [,12] [1,] 7673.688 -32785.16 6479.03 4391.65 1144.88 [2,] 10971.312 -16582.84 21823.97 11745.35 3717.12 $out [1] -24299 -24288 781 $group [1] 6 6 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-12144, -10505, -8932, -4070, 0, -11363, -9713, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6694e1439463151.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] [,7] [,8] [,9] [1,] 201630.0 201630.0 204842 213774 191125 167618.0 165979.0 116611 94743.0 [2,] 202845.5 207273.0 212168 219846 209737 189095.5 171699.0 141724 119427.0 [3,] 207311.5 210133.0 218636 224708 219461 200420.0 181373.5 155474 133221.0 [4,] 209704.0 217816.5 223498 225918 227139 208131.0 185405.0 161942 147757.5 [5,] 209704.0 225918.0 228349 225918 235642 218636.0 193556.0 178123 157905.0 [,10] [,11] [1,] 63943.0 NA [2,] 91096.5 NA [3,] 111749.0 NA [4,] 120637.0 NA [5,] 136037.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 204183.3 205324 213468.3 221938.5 211523.8 191737.8 175122.1 146252.4 [2,] 210439.7 214942 223803.7 227477.5 227398.2 209102.2 187624.9 164695.6 [,9] [,10] [,11] [1,] 120299.3 98275.38 NA [2,] 146142.7 125222.62 NA $out [1] 222706 221848 239712 236423 149831 $group [1] 1 1 4 4 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(201630, 202845.5, 207311.5, 209704, 209704, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/73l2b1439463151.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,] 162110.3 179371.5 165486.8 [2,] 179034.4 195753.2 181599.7 [3,] 185757.5 202826.2 185786.6 [4,] 192395.0 208095.2 193474.9 [5,] 198556.6 218240.0 199700.9 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 179663.7 197197.0 180370.2 [2,] 191851.4 208455.5 191202.9 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(162110.3, 179034.35, 185757.55, 192394.95, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1cc7y1439463151.ps tmp/1cc7y1439463151.png",intern=TRUE)) character(0) > try(system("convert tmp/2eu7p1439463151.ps tmp/2eu7p1439463151.png",intern=TRUE)) character(0) > try(system("convert tmp/3tiqs1439463151.ps tmp/3tiqs1439463151.png",intern=TRUE)) character(0) > try(system("convert tmp/45ome1439463151.ps tmp/45ome1439463151.png",intern=TRUE)) character(0) > try(system("convert tmp/5j4tr1439463151.ps tmp/5j4tr1439463151.png",intern=TRUE)) character(0) > try(system("convert tmp/6694e1439463151.ps tmp/6694e1439463151.png",intern=TRUE)) character(0) > try(system("convert tmp/73l2b1439463151.ps tmp/73l2b1439463151.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.502 0.428 2.962