R version 3.1.0 (2014-04-10) -- "Spring Dance" Copyright (C) 2014 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(329.6 + ,327.2 + ,326.3 + ,315.4 + ,308.6 + ,302.6 + ,295.6 + ,291.5 + ,288.1 + ,281.1 + ,282.4 + ,284.9 + ,274.2 + ,265.7 + ,259.7 + ,253.7 + ,249.5 + ,244.6 + ,243 + ,239.2 + ,235.7 + ,231.1 + ,226.7 + ,221.7 + ,219.4 + ,214.2 + ,211.7 + ,207.7 + ,204.7 + ,201.2 + ,199.9 + ,197.8 + ,195.2 + ,194.3 + ,192.8 + ,188.5 + ,183.2 + ,181.4 + ,180.5 + ,180.2 + ,179.2 + ,177.1 + ,174.2 + ,172.1 + ,171.1 + ,169.8 + ,169.5 + ,165.5 + ,167.2 + ,167.6 + ,171.8 + ,175.9 + ,180 + ,184.9 + ,184.6 + ,187.6 + ,191.5 + ,195.5 + ,201.6 + ,203.5 + ,209.1 + ,217.1 + ,227.6 + ,237.2 + ,245.6 + ,253.2 + ,260.5 + ,266.1 + ,273 + ,280.8 + ,284.4 + ,288.5 + ,284.8 + ,288.9 + ,299.6 + ,307.8 + ,311.4 + ,322 + ,317.8 + ,319.1 + ,322.3 + ,323.1 + ,322.8 + ,325 + ,323.2 + ,318.8 + ,328.2 + ,329.2 + ,326.5 + ,330.1 + ,323.8 + ,321.8 + ,319.6 + ,315.5 + ,310.7 + ,306.5 + ,295.1 + ,288 + ,293.9 + ,289.3 + ,287.4 + ,282.6 + ,276.9 + ,272.7 + ,267.9 + ,262.8 + ,256.6 + ,250.7 + ,243.2 + ,235.1 + ,229.6 + ,222.9 + ,217.6 + ,214.1 + ,210.8 + ,208 + ,202.6 + ,199 + ,195.5 + ,192.1 + ,189.4 + ,182.4 + ,179.2 + ,176.5 + ,174 + ,171.7 + ,169.8 + ,168.3 + ,166.4 + ,165.9 + ,166.4 + ,170.6 + ,177.6 + ,183.4 + ,191.9 + ,201.7 + ,210.6 + ,221.6 + ,232.2 + ,240.4 + ,248.4 + ,258.5 + ,265 + ,271.7 + ,273.9 + ,277.8 + ,273.4 + ,270.9 + ,268.3 + ,264.7 + ,264.1 + ,264.5 + ,262.2 + ,258.6 + ,259.4 + ,262.7 + ,264.9 + ,260.5 + ,256.4 + ,254.7 + ,254.8 + ,255.3 + ,256.8 + ,258.7 + ,259.8 + ,261.7 + ,264.7 + ,269.1 + ,279 + ,283.4 + ,285.5 + ,288.2 + ,292.1 + ,295.6 + ,302.4 + ,308.5 + ,314.1 + ,319.8 + ,329.7 + ,339.7) > 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] 180 > (np <- floor(n / par1)) [1] 15 > 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] 15 15 15 15 15 15 15 15 15 15 15 15 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 329.6 274.2 219.4 183.2 167.2 209.1 284.8 323.2 295.1 243.2 189.4 177.6 [2,] 327.2 265.7 214.2 181.4 167.6 217.1 288.9 318.8 288.0 235.1 182.4 183.4 [3,] 326.3 259.7 211.7 180.5 171.8 227.6 299.6 328.2 293.9 229.6 179.2 191.9 [4,] 315.4 253.7 207.7 180.2 175.9 237.2 307.8 329.2 289.3 222.9 176.5 201.7 [5,] 308.6 249.5 204.7 179.2 180.0 245.6 311.4 326.5 287.4 217.6 174.0 210.6 [6,] 302.6 244.6 201.2 177.1 184.9 253.2 322.0 330.1 282.6 214.1 171.7 221.6 [7,] 295.6 243.0 199.9 174.2 184.6 260.5 317.8 323.8 276.9 210.8 169.8 232.2 [8,] 291.5 239.2 197.8 172.1 187.6 266.1 319.1 321.8 272.7 208.0 168.3 240.4 [9,] 288.1 235.7 195.2 171.1 191.5 273.0 322.3 319.6 267.9 202.6 166.4 248.4 [10,] 281.1 231.1 194.3 169.8 195.5 280.8 323.1 315.5 262.8 199.0 165.9 258.5 [11,] 282.4 226.7 192.8 169.5 201.6 284.4 322.8 310.7 256.6 195.5 166.4 265.0 [12,] 284.9 221.7 188.5 165.5 203.5 288.5 325.0 306.5 250.7 192.1 170.6 271.7 [,13] [,14] [,15] [,16] [1,] 273.9 264.9 279.0 NA [2,] 277.8 260.5 283.4 NA [3,] 273.4 256.4 285.5 NA [4,] 270.9 254.7 288.2 NA [5,] 268.3 254.8 292.1 NA [6,] 264.7 255.3 295.6 NA [7,] 264.1 256.8 302.4 NA [8,] 264.5 258.7 308.5 NA [9,] 262.2 259.8 314.1 NA [10,] 258.6 261.7 319.8 NA [11,] 259.4 264.7 329.7 NA [12,] 262.7 269.1 339.7 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/1wmz01398687932.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/2i5a41398687932.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/3pqvx1398687932.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/4a3zo1398687932.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,] 167.20 167.6 171.8 175.90 174.00 171.70 169.80 168.3 166.40 165.90 166.40 [2,] 199.25 198.8 201.8 204.70 207.65 207.65 205.35 202.9 198.90 197.25 198.55 [3,] 264.90 260.5 256.4 253.70 249.50 253.20 256.80 258.7 259.80 258.60 259.40 [4,] 281.90 285.7 289.7 288.75 289.75 289.10 286.25 282.1 280.55 280.95 283.40 [5,] 329.60 327.2 328.2 329.20 326.50 330.10 323.80 321.8 322.30 323.10 329.70 [,12] [1,] 165.5 [2,] 197.8 [3,] 262.7 [4,] 286.7 [5,] 339.7 $n [1] 15 15 15 15 15 15 15 15 15 15 15 15 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 231.1826 225.0488 220.5408 219.4114 216.007 219.9721 223.7965 226.39 [2,] 298.6174 295.9512 292.2592 287.9886 282.993 286.4279 289.8035 291.01 [,9] [,10] [,11] [,12] [1,] 226.4905 224.4542 224.7851 226.4329 [2,] 293.1095 292.7458 294.0149 298.9671 $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(167.2, 199.25, 264.9, 281.9, 329.6, 167.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5jk9b1398687932.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,] 281.10 221.7 188.50 165.50 167.20 209.10 284.80 306.50 250.70 192.10 [2,] 286.50 233.4 194.75 170.45 173.85 232.40 303.70 317.15 265.35 200.80 [3,] 299.10 243.8 200.55 175.65 184.75 256.85 318.45 322.50 279.75 212.45 [4,] 320.85 256.7 209.70 180.35 193.50 276.90 322.55 327.35 288.65 226.25 [5,] 329.60 274.2 219.40 183.20 203.50 288.50 325.00 330.10 295.10 243.20 [,11] [,12] [,13] [,14] [,15] [,16] [1,] 165.90 177.60 258.60 254.70 279.00 NA [2,] 167.35 196.80 262.45 255.85 286.85 NA [3,] 171.15 226.90 264.60 259.25 299.00 NA [4,] 177.85 253.45 272.15 263.20 316.95 NA [5,] 189.40 271.70 277.80 269.10 339.70 NA $n [1] 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,] 283.4327 233.1727 193.7312 171.1345 175.7875 236.5533 309.8524 317.8477 [2,] 314.7673 254.4273 207.3688 180.1655 193.7125 277.1467 327.0476 327.1523 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 269.1227 200.8421 166.3609 201.0616 260.1758 255.8976 285.2712 NA [2,] 290.3773 224.0579 175.9391 252.7384 269.0242 262.6024 312.7288 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] NA Warning message: In bxp(list(stats = c(281.1, 286.5, 299.1, 320.85, 329.6, 221.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6wyaf1398687932.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,] 51.21411 152.50 79.200 [2,] 51.85516 153.75 81.550 [3,] 52.61223 156.80 83.175 [4,] 53.40712 161.00 85.875 [5,] 53.92297 163.30 88.900 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 51.90437 153.4932 81.20234 [2,] 53.32009 160.1068 85.14766 $out [1] 56.12341 174.20000 $group [1] 1 2 $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(51.2141089191343, 51.8551596210014, 52.6122324017692, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1wmz01398687932.ps tmp/1wmz01398687932.png",intern=TRUE)) character(0) > try(system("convert tmp/2i5a41398687932.ps tmp/2i5a41398687932.png",intern=TRUE)) character(0) > try(system("convert tmp/3pqvx1398687932.ps tmp/3pqvx1398687932.png",intern=TRUE)) character(0) > try(system("convert tmp/4a3zo1398687932.ps tmp/4a3zo1398687932.png",intern=TRUE)) character(0) > try(system("convert tmp/5jk9b1398687932.ps tmp/5jk9b1398687932.png",intern=TRUE)) character(0) > try(system("convert tmp/6wyaf1398687932.ps tmp/6wyaf1398687932.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.222 0.849 5.089