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(350840 + ,354950 + ,342750 + ,318610 + ,303890 + ,293480 + ,286820 + ,283650 + ,276190 + ,268670 + ,275960 + ,287040 + ,291500 + ,287540 + ,272340 + ,256570 + ,246190 + ,237340 + ,235890 + ,232790 + ,226100 + ,221110 + ,221950 + ,222990 + ,232840 + ,231380 + ,221690 + ,210190 + ,202210 + ,195210 + ,194050 + ,192360 + ,187170 + ,185930 + ,188840 + ,189350 + ,194320 + ,195850 + ,188840 + ,182380 + ,177200 + ,169140 + ,171900 + ,167320 + ,164130 + ,162550 + ,166260 + ,166010 + ,177070 + ,180800 + ,179570 + ,178130 + ,178180 + ,179430 + ,179130 + ,182220 + ,183650 + ,187110 + ,197780 + ,204000 + ,221330 + ,232500 + ,237570 + ,241100 + ,244420 + ,247240 + ,254300 + ,258970 + ,262230 + ,268880 + ,277950 + ,286630 + ,299830 + ,308090 + ,311400 + ,313520 + ,310980 + ,314910 + ,310950 + ,310720 + ,310380 + ,310570 + ,314790 + ,323400 + ,335010 + ,341630 + ,340820 + ,336280 + ,325490 + ,323750 + ,317510 + ,313890 + ,308610 + ,303720 + ,303090 + ,305140 + ,304040 + ,307100 + ,304330 + ,294710 + ,286890 + ,279050 + ,271860 + ,266710 + ,259590 + ,253830 + ,250640 + ,249140 + ,250840 + ,247590 + ,237830 + ,226380 + ,217230 + ,211420 + ,207620 + ,204310 + ,197490 + ,193580 + ,192330 + ,191970 + ,196070 + ,191940 + ,185620 + ,179410 + ,173920 + ,169190 + ,166840 + ,165170 + ,161450 + ,160830 + ,163670 + ,170830 + ,182690 + ,190940 + ,197770 + ,205090 + ,210720 + ,220210 + ,229730 + ,237070 + ,241620 + ,250370 + ,258570 + ,269860 + ,283220 + ,289610 + ,281770 + ,274700 + ,267650 + ,261380 + ,260500 + ,260730 + ,254200 + ,250450 + ,253380 + ,263740 + ,276240 + ,273820 + ,265890 + ,258400 + ,253520 + ,250710 + ,252850 + ,255260 + ,251170 + ,252500 + ,257780 + ,269900 + ,291590 + ,298870 + ,295570 + ,292100 + ,290870 + ,290580 + ,297970 + ,304010 + ,304340 + ,309850 + ,322320 + ,340170 + ,369280 + ,376690 + ,379700 + ,379520 + ,377770 + ,381560 + ,394580 + ,399320 + ,400370 + ,408200 + ,419070 + ,437730) > 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] 192 > (np <- floor(n / par1)) [1] 16 > 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] 16 16 16 16 16 16 16 16 16 16 16 16 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 350840 291500 232840 194320 177070 221330 299830 335010 304040 250840 [2,] 354950 287540 231380 195850 180800 232500 308090 341630 307100 247590 [3,] 342750 272340 221690 188840 179570 237570 311400 340820 304330 237830 [4,] 318610 256570 210190 182380 178130 241100 313520 336280 294710 226380 [5,] 303890 246190 202210 177200 178180 244420 310980 325490 286890 217230 [6,] 293480 237340 195210 169140 179430 247240 314910 323750 279050 211420 [7,] 286820 235890 194050 171900 179130 254300 310950 317510 271860 207620 [8,] 283650 232790 192360 167320 182220 258970 310720 313890 266710 204310 [9,] 276190 226100 187170 164130 183650 262230 310380 308610 259590 197490 [10,] 268670 221110 185930 162550 187110 268880 310570 303720 253830 193580 [11,] 275960 221950 188840 166260 197780 277950 314790 303090 250640 192330 [12,] 287040 222990 189350 166010 204000 286630 323400 305140 249140 191970 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [1,] 196070 182690 283220 276240 291590 369280 NA [2,] 191940 190940 289610 273820 298870 376690 NA [3,] 185620 197770 281770 265890 295570 379700 NA [4,] 179410 205090 274700 258400 292100 379520 NA [5,] 173920 210720 267650 253520 290870 377770 NA [6,] 169190 220210 261380 250710 290580 381560 NA [7,] 166840 229730 260500 252850 297970 394580 NA [8,] 165170 237070 260730 255260 304010 399320 NA [9,] 161450 241620 254200 251170 304340 400370 NA [10,] 160830 250370 250450 252500 309850 408200 NA [11,] 163670 258570 253380 257780 322320 419070 NA [12,] 170830 269860 263740 269900 340170 437730 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/1uwnw1416833167.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/2bic81416833167.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/3dpt31416833167.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/44uaz1416833167.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,] 177070 180800 179570 178130 173920 169140 166840 165170 161450 160830 [2,] 208700 213615 209730 207640 206465 203315 200835 198335 192330 190345 [3,] 279730 280680 269115 257485 249855 248975 253575 257115 252685 251475 [4,] 301935 307595 307865 304115 297380 292030 292395 293830 290265 286300 [5,] 369280 376690 379700 379520 377770 381560 394580 399320 400370 408200 [,11] [,12] [1,] 163670 166010 [2,] 195055 197985 [3,] 255580 266800 [4,] 290520 296090 [5,] 419070 437730 $n [1] 16 16 16 16 16 16 16 16 16 16 16 16 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 242902.2 243557.9 230351.7 219377.4 213943.6 213932.6 217408.8 219394.5 [2,] 316557.8 317802.1 307878.3 295592.6 285766.4 284017.4 289741.2 294835.5 [,9] [,10] [,11] [,12] [1,] 214000.7 213572.8 217871.3 228048.5 [2,] 291369.3 289377.2 293288.7 305551.5 $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(177070, 208700, 279730, 301935, 369280, 180800, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5mtud1416833167.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,] 268670 221110 185930 162550 177070 221330 308090 303090 249140 191970 [2,] 279920 224545 189095 166135 178655 239335 310475 306875 256710 195535 [3,] 290260 236615 194630 170520 180185 250770 310965 320630 275455 209520 [4,] 330680 264455 215940 185610 185380 265555 314155 335645 299375 232105 [5,] 354950 291500 232840 195850 187110 286630 314910 341630 307100 250840 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [1,] 160830 182690 250450 250710 290580 369280 NA [2,] 164420 201430 257350 252675 291845 378645 NA [3,] 170010 224970 262560 256520 298420 388070 NA [4,] 182515 245995 278235 267895 307095 404285 NA [5,] 196070 269860 289610 276240 322320 437730 NA $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 267108 218411.8 182385.8 161637.3 177117.7 238810.9 309286.5 307507.8 [2,] 313412 254818.2 206874.2 179402.7 183252.3 262729.1 312643.5 333752.2 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 255995.2 192840.2 161756.7 204643.6 253034.2 249578.1 291464.4 376375.4 [2,] 294914.8 226199.8 178263.3 245296.4 272085.8 263461.9 305375.6 399764.6 [,17] [1,] NA [2,] NA $out [1] 197780 204000 299830 323400 340170 $group [1] 5 5 7 7 15 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" NA Warning message: In bxp(list(stats = c(268670, 279920, 290260, 330680, 354950, 221110, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6nksb1416833167.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,] 59392.78 192210 83937.50 [2,] 60605.67 200760 85456.25 [3,] 61777.70 220080 86642.50 [4,] 64313.44 243145 89352.50 [5,] 66941.96 271720 90572.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 60086.56 200747.9 84865.39 [2,] 63468.84 239412.1 88419.61 $out [1] 71521.77 $group [1] 1 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(59392.7839577335, 60605.6703099161, 61777.697329073, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1uwnw1416833167.ps tmp/1uwnw1416833167.png",intern=TRUE)) character(0) > try(system("convert tmp/2bic81416833167.ps tmp/2bic81416833167.png",intern=TRUE)) character(0) > try(system("convert tmp/3dpt31416833167.ps tmp/3dpt31416833167.png",intern=TRUE)) character(0) > try(system("convert tmp/44uaz1416833167.ps tmp/44uaz1416833167.png",intern=TRUE)) character(0) > try(system("convert tmp/5mtud1416833167.ps tmp/5mtud1416833167.png",intern=TRUE)) character(0) > try(system("convert tmp/6nksb1416833167.ps tmp/6nksb1416833167.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.225 0.436 2.674