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(228768.00 + ,227916.00 + ,227052.00 + ,225264.00 + ,242952.00 + ,242016.00 + ,228768.00 + ,219960.00 + ,220812.00 + ,220812.00 + ,221760.00 + ,223464.00 + ,226116.00 + ,226116.00 + ,224412.00 + ,219960.00 + ,242952.00 + ,246456.00 + ,241164.00 + ,228768.00 + ,234072.00 + ,226116.00 + ,229704.00 + ,231420.00 + ,233208.00 + ,228768.00 + ,229704.00 + ,223464.00 + ,242952.00 + ,249108.00 + ,243816.00 + ,234072.00 + ,244668.00 + ,233208.00 + ,243816.00 + ,242952.00 + ,245604.00 + ,235860.00 + ,246456.00 + ,245604.00 + ,261504.00 + ,257916.00 + ,243816.00 + ,236712.00 + ,246456.00 + ,233208.00 + ,242952.00 + ,244668.00 + ,248256.00 + ,240312.00 + ,244668.00 + ,247320.00 + ,257064.00 + ,249108.00 + ,238512.00 + ,227052.00 + ,237660.00 + ,208500.00 + ,222612.00 + ,230556.00 + ,238512.00 + ,227052.00 + ,227052.00 + ,227052.00 + ,233208.00 + ,224412.00 + ,212868.00 + ,203208.00 + ,210216.00 + ,182856.00 + ,199620.00 + ,209364.00 + ,211152.00 + ,201408.00 + ,202260.00 + ,199620.00 + ,208500.00 + ,202260.00 + ,189960.00 + ,181068.00 + ,196104.00 + ,163452.00 + ,184656.00 + ,194316.00 + ,194316.00 + ,182856.00 + ,172260.00 + ,171408.00 + ,181068.00 + ,172260.00 + ,155508.00 + ,143964.00 + ,156360.00 + ,127212.00 + ,153708.00 + ,167808.00 + ,172260.00 + ,162516.00 + ,150204.00 + ,159012.00 + ,162516.00 + ,159864.00 + ,133356.00 + ,121056.00 + ,129852.00 + ,103356.00 + ,130716.00 + ,140460.00 + ,148404.00 + ,135156.00 + ,122760.00 + ,129852.00 + ,133356.00 + ,126348.00 + ,99852.00 + ,88308.00 + ,98904.00 + ,69756.00 + ,101556.00 + ,121056.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,] 228768 226116 233208 245604 248256 238512 211152 194316 172260 148404 [2,] 227916 226116 228768 235860 240312 227052 201408 182856 162516 135156 [3,] 227052 224412 229704 246456 244668 227052 202260 172260 150204 122760 [4,] 225264 219960 223464 245604 247320 227052 199620 171408 159012 129852 [5,] 242952 242952 242952 261504 257064 233208 208500 181068 162516 133356 [6,] 242016 246456 249108 257916 249108 224412 202260 172260 159864 126348 [7,] 228768 241164 243816 243816 238512 212868 189960 155508 133356 99852 [8,] 219960 228768 234072 236712 227052 203208 181068 143964 121056 88308 [9,] 220812 234072 244668 246456 237660 210216 196104 156360 129852 98904 [10,] 220812 226116 233208 233208 208500 182856 163452 127212 103356 69756 [11,] 221760 229704 243816 242952 222612 199620 184656 153708 130716 101556 [12,] 223464 231420 242952 244668 230556 209364 194316 167808 140460 121056 [,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,] -852 0 -4440 -9744 -7944 -11460 -9744 -11460 -9744 -13248 [2,] -864 -1704 936 10596 4356 0 852 -10596 -12312 -12396 [3,] -1788 -4452 -6240 -852 2652 0 -2640 -852 8808 7092 [4,] 17688 22992 19488 15900 9744 6156 8880 9660 3504 3504 [5,] -936 3504 6156 -3588 -7956 -8796 -6240 -8808 -2652 -7008 [6,] -13248 -5292 -5292 -14100 -10596 -11544 -12300 -16752 -26508 -26496 [7,] -8808 -12396 -9744 -7104 -11460 -9660 -8892 -11544 -12300 -11544 [8,] 852 5304 10596 9744 10608 7008 15036 12396 8796 10596 [9,] 0 -7956 -11460 -13248 -29160 -27360 -32652 -29148 -26496 -29148 [10,] 948 3588 10608 9744 14112 16764 21204 26496 27360 31800 [11,] 1704 1716 -864 1716 7944 9744 9660 14100 9744 19500 [12,] 2652 1788 2652 3588 7956 1788 0 4452 7944 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/1wvt51438175062.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/2vwjx1438175062.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/3t31r1438175062.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/4rpgk1438175062.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] [1,] 148404 135156 122760 129852 133356 126348 99852 88308 98904 69756 [2,] 194316 182856 172260 171408 181068 172260 155508 143964 156360 127212 [3,] 227442 226584 225732 221712 238080 233214 220818 211584 215514 195678 [4,] 238512 228768 229704 227052 242952 249108 241164 228768 237660 226116 [5,] 248256 240312 246456 247320 261504 257916 243816 236712 246456 233208 [,11] [,12] [1,] 101556 121056 [2,] 153708 167808 [3,] 210690 216414 [4,] 229704 231420 [5,] 243816 244668 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 205359.9 203644.5 197030.7 193910 207160.3 194817.7 178020.8 169212.5 [2,] 249524.1 249523.5 254433.3 249514 268999.7 271610.3 263615.2 253955.5 [,9] [,10] [,11] [,12] [1,] 174893.3 146261.6 172719.4 184630.9 [2,] 256134.7 245094.4 248660.6 248197.1 $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(148404, 194316, 227442, 238512, 248256, 135156, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5djze1438175062.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] [1,] -13248 -12396 -6240 3504 -8808 -16752 -12396 5304 -32652 948 -864 [2,] -11460 -10596 -2640 6156 -7956 -16752 -11544 7008 -29148 9744 1716 [3,] -9744 -432 -852 9702 -4914 -12774 -10602 10170 -26928 15438 8802 [4,] -4440 936 2652 17688 -936 -10596 -8892 10608 -11460 26496 9744 [5,] 0 10596 8808 22992 6156 -5292 -7104 15036 0 31800 19500 [,12] [1,] 0 [2,] 1788 [3,] 2652 [4,] 4452 [5,] 7956 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -13251.472 -6193.847 -3496.094 3940.153 -8421.472 -15849.783 -11927.045 [2,] -6236.528 5329.847 1792.094 15463.847 -1406.528 -9698.217 -9276.955 [,8] [,9] [,10] [,11] [,12] [1,] 8371.296 -35765.63 7068.033 4790.891 1248.96 [2,] 11968.704 -18090.37 23807.967 12813.109 4055.04 $out [1] -26508 -26496 852 $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(-13248, -11460, -9744, -4440, 0, -12396, -10596, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6yuft1438175062.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] [,10] [1,] 219960 219960 223464 233208 208500 182856 181068 127212 103356 69756 [2,] 221286 226116 231456 239832 228804 206286 187308 154608 130284 99378 [3,] 226158 229236 238512 245136 239412 218640 197862 169608 145332 121908 [4,] 228768 237618 243816 246456 247788 227052 202260 176664 161190 131604 [5,] 228768 246456 249108 246456 257064 238512 211152 194316 172260 148404 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 222745.4 223989.9 232874.5 242114.7 230753.3 209168.5 191042.3 159548.1 [2,] 229570.6 234482.1 244149.5 248157.3 248070.7 228111.5 204681.7 179667.9 [,9] [,10] [,11] [1,] 131235.6 107209.5 NA [2,] 159428.4 136606.5 NA $out [1] 242952 242016 261504 257916 163452 $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(219960, 221286, 226158, 228768, 228768, 219960, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7or1d1438175062.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,] 176847.6 195678 180531.0 [2,] 195310.2 213549 198108.8 [3,] 202644.6 221265 202676.2 [4,] 209885.4 227013 211063.5 [5,] 216607.2 238080 217855.5 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 195996.8 215124 196767.5 [2,] 209292.4 227406 208585.0 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(176847.6, 195310.2, 202644.6, 209885.4, 216607.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1wvt51438175062.ps tmp/1wvt51438175062.png",intern=TRUE)) character(0) > try(system("convert tmp/2vwjx1438175062.ps tmp/2vwjx1438175062.png",intern=TRUE)) character(0) > try(system("convert tmp/3t31r1438175062.ps tmp/3t31r1438175062.png",intern=TRUE)) character(0) > try(system("convert tmp/4rpgk1438175062.ps tmp/4rpgk1438175062.png",intern=TRUE)) character(0) > try(system("convert tmp/5djze1438175062.ps tmp/5djze1438175062.png",intern=TRUE)) character(0) > try(system("convert tmp/6yuft1438175062.ps tmp/6yuft1438175062.png",intern=TRUE)) character(0) > try(system("convert tmp/7or1d1438175062.ps tmp/7or1d1438175062.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.659 0.442 3.124