R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 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(40927.00 + ,40856.00 + ,40778.00 + ,40635.00 + ,42103.00 + ,42032.00 + ,40927.00 + ,40194.00 + ,40265.00 + ,40265.00 + ,40336.00 + ,40486.00 + ,40856.00 + ,40414.00 + ,40856.00 + ,40486.00 + ,41661.00 + ,42181.00 + ,39973.00 + ,39381.00 + ,39894.00 + ,39823.00 + ,39381.00 + ,39453.00 + ,40336.00 + ,40194.00 + ,40336.00 + ,40336.00 + ,41298.00 + ,41440.00 + ,38790.00 + ,38790.00 + ,39823.00 + ,39310.00 + ,38427.00 + ,38790.00 + ,39674.00 + ,39232.00 + ,39161.00 + ,38206.00 + ,39602.00 + ,39894.00 + ,37023.00 + ,36952.00 + ,38427.00 + ,37615.00 + ,36218.00 + ,36810.00 + ,37465.00 + ,37615.00 + ,37173.00 + ,36290.00 + ,38128.00 + ,38128.00 + ,34893.00 + ,34673.00 + ,35556.00 + ,33939.00 + ,32314.00 + ,32835.00 + ,33939.00 + ,33055.00 + ,32464.00 + ,31210.00 + ,32906.00 + ,32977.00 + ,29743.00 + ,29664.00 + ,30256.00 + ,28418.00 + ,26430.00 + ,27235.00 + ,28339.00 + ,27164.00 + ,27093.00 + ,25910.00 + ,27826.00 + ,28197.00 + ,24585.00 + ,23780.00 + ,24293.00 + ,22305.00 + ,20246.00 + ,20909.00 + ,22156.00 + ,20688.00 + ,20909.00 + ,20026.00 + ,21864.00 + ,22084.00 + ,17668.00 + ,17375.00 + ,18180.00 + ,16050.00 + ,14134.00 + ,14797.00 + ,16414.00 + ,14504.00 + ,14355.00 + ,12880.00 + ,14504.00 + ,15017.00 + ,10451.00 + ,10451.00 + ,11113.00 + ,9347.00 + ,7359.00 + ,8392.00 + ,10230.00 + ,8242.00 + ,9055.00 + ,7950.00 + ,9717.00 + ,10308.00 + ,5592.00 + ,5229.00 + ,5963.00 + ,4196.00 + ,2800.00 + ,3384.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), Standard Deviation Plot (v1.0.2) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_sdplot.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)) > ari <- array(0,dim=par1) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[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] [,11] [1,] 40927 40856 40336 39674 37465 33939 28339 22156 16414 10230 NA [2,] 40856 40414 40194 39232 37615 33055 27164 20688 14504 8242 NA [3,] 40778 40856 40336 39161 37173 32464 27093 20909 14355 9055 NA [4,] 40635 40486 40336 38206 36290 31210 25910 20026 12880 7950 NA [5,] 42103 41661 41298 39602 38128 32906 27826 21864 14504 9717 NA [6,] 42032 42181 41440 39894 38128 32977 28197 22084 15017 10308 NA [7,] 40927 39973 38790 37023 34893 29743 24585 17668 10451 5592 NA [8,] 40194 39381 38790 36952 34673 29664 23780 17375 10451 5229 NA [9,] 40265 39894 39823 38427 35556 30256 24293 18180 11113 5963 NA [10,] 40265 39823 39310 37615 33939 28418 22305 16050 9347 4196 NA [11,] 40336 39381 38427 36218 32314 26430 20246 14134 7359 2800 NA [12,] 40486 39453 38790 36810 32835 27235 20909 14797 8392 3384 NA > arr.sd <- array(NA,dim=par1) > arr.range <- array(NA,dim=par1) > arr.iqr <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.sd[j] <- sqrt(var(arr[j,],na.rm=TRUE)) + arr.range[j] <- max(arr[j,],na.rm=TRUE) - min(arr[j,],na.rm=TRUE) + arr.iqr[j] <- quantile(arr[j,],0.75,na.rm=TRUE) - quantile(arr[j,],0.25,na.rm=TRUE) + } > overall.sd <- sqrt(var(x)) > overall.range <- max(x) - min(x) > overall.iqr <- quantile(x,0.75) - quantile(x,0.25) > postscript(file="/var/wessaorg/rcomp/tmp/1k2hj1470929899.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.sd,type='b',ylab='S.D.',main='Standard Deviation Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.sd,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2j3n71470929899.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.range,type='b',ylab='range',main='Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.range,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/38ila1470929899.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.iqr,type='b',ylab='IQR',main='Interquartile Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.iqr,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/48nuf1470929899.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] [1,] 10230 8242 9055.0 7950 9717 10308.0 5592 5229.0 5963 4196.0 2800 [2,] 22156 20688 20909.0 20026 21864 22084.0 17668 17375.0 18180 16050.0 14134 [3,] 35702 35335 34818.5 33750 35517 35552.5 32318 32168.5 32906 31178.5 29372 [4,] 40336 40194 40336.0 40336 41298 41440.0 38790 38790.0 39823 39310.0 38427 [5,] 40927 40856 40856.0 40635 42103 42181.0 40927 40194.0 40265 40265.0 40336 [,12] [1,] 3384 [2,] 14797 [3,] 30035 [4,] 38790 [5,] 40486 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 26618.55 25589.02 25112 23602.31 25807 25881.47 21764.61 21468.71 22092.29 [2,] 44785.45 45080.98 44525 43897.69 45227 45223.53 42871.39 42868.29 43719.71 [,10] [,11] [,12] [1,] 19556.88 17234.25 18047.14 [2,] 42800.12 41509.75 42022.86 $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(10230, 22156, 35702, 40336, 40927, 8242, 20688, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5i2uj1470929899.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,] 40194.0 39381.0 38427.0 36218.0 32314 26430.0 20246.0 14134.0 7359.0 [2,] 40300.5 39638.0 38790.0 36987.5 34306 29041.0 23042.5 16712.5 9899.0 [3,] 40706.5 40193.5 40008.5 38316.5 35923 30733.0 25247.5 19103.0 11996.5 [4,] 40927.0 40856.0 40336.0 39417.0 37540 32941.5 27495.0 21386.5 14504.0 [5,] 40927.0 42181.0 41440.0 39894.0 38128 33939.0 28339.0 22156.0 16414.0 [,10] [,11] [1,] 2800.0 NA [2,] 4712.5 NA [3,] 6956.5 NA [4,] 9386.0 NA [5,] 10308.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,] 40420.75 39637.96 39303.36 37208.39 34447.95 28953.96 23216.68 16971.16 [2,] 40992.25 40749.04 40713.64 39424.61 37398.05 32512.04 27278.32 21234.84 [,9] [,10] [,11] [1,] 9896.129 4824.885 NA [2,] 14096.871 9088.115 NA $out [1] 42103 42032 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(40194, 40300.5, 40706.5, 40927, 40927, 39381, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/65bjx1470929899.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.sd,arr.range,arr.iqr)) > names(z) <- list('S.D.','Range','IQR') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Variability',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 11244.50 30697.0 16468.75 [2,] 11902.22 32129.5 17553.38 [3,] 12485.91 33493.5 18628.75 [4,] 13152.83 35702.0 20519.12 [5,] 13914.60 37536.0 22212.75 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 11915.50 31864.06 17276.05 [2,] 13056.32 35122.94 19981.45 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(11244.5020955922, 11902.2168520193, 12485.907371611, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1k2hj1470929899.ps tmp/1k2hj1470929899.png",intern=TRUE)) character(0) > try(system("convert tmp/2j3n71470929899.ps tmp/2j3n71470929899.png",intern=TRUE)) character(0) > try(system("convert tmp/38ila1470929899.ps tmp/38ila1470929899.png",intern=TRUE)) character(0) > try(system("convert tmp/48nuf1470929899.ps tmp/48nuf1470929899.png",intern=TRUE)) character(0) > try(system("convert tmp/5i2uj1470929899.ps tmp/5i2uj1470929899.png",intern=TRUE)) character(0) > try(system("convert tmp/65bjx1470929899.ps tmp/65bjx1470929899.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.156 0.222 2.419