R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 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(426.113 + ,383.703 + ,232.444 + ,70.939 + ,226.731 + ,947.293 + ,611.281 + ,158.047 + ,33.999 + ,37.028 + ,388.3 + ,506.652 + ,392.25 + ,180.818 + ,198.296 + ,217.465 + ,275.562 + ,1030.944 + ,57.47 + ,136.452 + ,556.277 + ,213.361 + ,274.482 + ,220.553 + ,236.71 + ,260.642 + ,2763.544 + ,213.923 + ,169.861 + ,403.064 + ,449.594 + ,406.167 + ,206.893 + ,156.187 + ,257.102 + ,62.156 + ,662.883 + ,251.422 + ,171.328 + ,350.089 + ,221.588 + ,4.813 + ,183.186 + ,190.379 + ,223.166 + ,232.669 + ,356.725 + ,109.215 + ,475.834 + ,315.955 + ,694.87 + ,8.95 + ,278.741 + ,308.16 + ,207.533 + ,192.797 + ,601.162 + ,289.714 + ,293.671 + ,386.688 + ,699.645 + ,85.094 + ,131.812 + ,645.285 + ,197.549 + ,308.174 + ,86.58 + ,242.205 + ,238.502 + ,187.881 + ,140.321 + ,440.31 + ,421.403 + ,218.761 + ,1305.923 + ,137.55 + ,262.517 + ,348.821 + ,150.034 + ,64.016 + ,261.596 + ,259.7 + ,171.26 + ,203.077 + ,249.148 + ,211.655 + ,252.64 + ,438.555 + ,239.89 + ,401.915 + ,216.886 + ,184.641 + ,380.155 + ,653.641 + ,313.906 + ,366.936 + ,236.302 + ,229.641 + ,235.577 + ,103.898 + ,263.906 + ,241.171 + ,216.548 + ,295.281 + ,193.299 + ,204.386 + ,257.567 + ,136.813 + ,240.755 + ,59.609 + ,213.511 + ,380.531 + ,242.344 + ,250.407 + ,183.613 + ,191.835 + ,266.793 + ,246.542 + ,330.563 + ,403.556 + ,208.108 + ,324.04 + ,308.532 + ,199.297 + ,200.156 + ,262.875 + ,287.069 + ,190.157 + ,199.746 + ,265.777 + ,435.956 + ,72.844 + ,756.46 + ,206.771 + ,4202.361 + ,401.422 + ,216.046 + ,39.047 + ,441.437) > 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] 139 > (np <- floor(n / par1)) [1] 11 > 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] 12 12 12 12 12 12 12 11 11 11 11 11 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 426.113 392.250 236.710 662.883 475.834 699.645 421.403 249.148 [2,] 383.703 180.818 260.642 251.422 315.955 85.094 218.761 211.655 [3,] 232.444 198.296 2763.544 171.328 694.870 131.812 1305.923 252.640 [4,] 70.939 217.465 213.923 350.089 8.950 645.285 137.550 438.555 [5,] 226.731 275.562 169.861 221.588 278.741 197.549 262.517 239.890 [6,] 947.293 1030.944 403.064 4.813 308.160 308.174 348.821 401.915 [7,] 611.281 57.470 449.594 183.186 207.533 86.580 150.034 216.886 [8,] 158.047 136.452 406.167 190.379 192.797 242.205 64.016 184.641 [9,] 33.999 556.277 206.893 223.166 601.162 238.502 261.596 380.155 [10,] 37.028 213.361 156.187 232.669 289.714 187.881 259.700 653.641 [11,] 388.300 274.482 257.102 356.725 293.671 140.321 171.260 313.906 [12,] 506.652 220.553 62.156 109.215 386.688 440.310 203.077 366.936 [,9] [,10] [,11] [,12] [1,] 236.302 240.755 208.108 756.460 [2,] 229.641 59.609 324.040 206.771 [3,] 235.577 213.511 308.532 4202.361 [4,] 103.898 380.531 199.297 401.422 [5,] 263.906 242.344 200.156 216.046 [6,] 241.171 250.407 262.875 39.047 [7,] 216.548 183.613 287.069 441.437 [8,] 295.281 191.835 190.157 NA [9,] 193.299 266.793 199.746 NA [10,] 204.386 246.542 265.777 NA [11,] 257.567 330.563 435.956 NA [12,] 136.813 403.556 72.844 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/1o8201380881890.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/2q7ke1380881890.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/3grr61380881890.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/4yjd91380881890.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] [1,] 208.1080 59.6090 131.8120 8.9500 169.8610 39.0470 57.4700 136.452 [2,] 238.7325 193.7945 205.9035 120.7240 208.1010 245.7890 166.6100 171.344 [3,] 406.8265 224.2010 244.1085 215.6940 233.3105 308.1670 212.0405 190.379 [4,] 569.3585 288.2985 1000.3965 390.9765 263.2115 402.4895 364.2530 217.501 [5,] 756.4600 383.7030 1305.9230 645.2850 278.7410 403.0640 611.2810 242.205 [,9] [,10] [,11] [,12] [1,] 33.9990 156.1870 140.3210 62.156 [2,] 203.3195 196.1335 257.3345 123.014 [3,] 238.5020 232.6690 293.6710 220.553 [4,] 323.4740 262.7385 343.6440 395.122 [5,] 380.1550 289.7140 435.9560 506.652 $n [1] 12 12 12 12 12 12 12 11 11 11 11 11 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 256.0258 181.0971 -118.2651 92.43002 208.1742 236.6949 121.8942 168.3904 [2,] 557.6272 267.3049 606.4821 338.95798 258.4468 379.6391 302.1868 212.3676 [,9] [,10] [,11] [,12] [1,] 181.2618 200.9392 252.5542 90.92403 [2,] 295.7422 264.3988 334.7878 350.18197 $out [1] 2763.544 4202.361 947.293 1030.944 4.813 406.167 64.016 295.281 [9] 556.277 601.162 37.028 653.641 $group [1] 3 3 6 6 6 8 8 8 9 9 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(208.108, 238.7325, 406.8265, 569.3585, 756.46, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5fjcz1380881890.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] [1,] 33.9990 57.470 62.1560 4.8130 8.9500 85.0940 64.0160 184.641 [2,] 114.4930 189.557 188.3770 177.2570 243.1370 136.0665 160.6470 228.388 [3,] 308.0735 219.009 246.9060 222.3770 300.9155 218.0255 239.2305 283.273 [4,] 466.3825 333.906 404.6155 300.7555 431.2610 374.2420 305.6690 391.035 [5,] 947.2930 392.250 449.5940 356.7250 694.8700 699.6450 421.4030 438.555 [,9] [,10] [,11] [,12] [1,] 136.8130 59.609 72.8440 39.0470 [2,] 198.8425 202.673 199.5215 211.4085 [3,] 232.6090 244.443 235.4915 401.4220 [4,] 249.3690 298.678 297.8005 598.9485 [5,] 295.2810 403.556 435.9560 756.4600 $n [1] 12 12 12 12 12 12 12 12 12 12 12 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 147.5743 153.1705 148.2782 166.0485 215.1109 109.3921 173.085 209.0886 [2,] 468.5727 284.8475 345.5338 278.7055 386.7201 326.6589 305.376 357.4574 [,9] [,10] [,11] [,12] [1,] 209.5635 200.6545 190.6658 169.9894 [2,] 255.6545 288.2315 280.3172 632.8546 $out [1] 1030.944 556.277 2763.544 662.883 1305.923 653.641 103.898 4202.361 $group [1] 2 2 3 4 7 8 9 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" NA Warning message: In bxp(list(stats = c(33.999, 114.493, 308.0735, 466.3825, 947.293, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6uk491380881890.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,] 33.90345 108.8800 46.15700 [2,] 90.51890 333.1225 70.39625 [3,] 162.11864 551.0815 135.45875 [4,] 190.12066 626.4740 264.36237 [5,] 311.10351 1026.1310 282.85250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 116.6896 417.2819 46.9895 [2,] 207.5477 684.8811 223.9280 $out [1] 1290.712 4070.549 637.926 $group [1] 1 2 3 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(33.9034515203456, 90.5188996814888, 162.1186446551, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1o8201380881890.ps tmp/1o8201380881890.png",intern=TRUE)) character(0) > try(system("convert tmp/2q7ke1380881890.ps tmp/2q7ke1380881890.png",intern=TRUE)) character(0) > try(system("convert tmp/3grr61380881890.ps tmp/3grr61380881890.png",intern=TRUE)) character(0) > try(system("convert tmp/4yjd91380881890.ps tmp/4yjd91380881890.png",intern=TRUE)) character(0) > try(system("convert tmp/5fjcz1380881890.ps tmp/5fjcz1380881890.png",intern=TRUE)) character(0) > try(system("convert tmp/6uk491380881890.ps tmp/6uk491380881890.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.189 0.952 5.112