R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" 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(1.56,1.56,1.54,1.54,1.54,1.54,1.57,1.58,1.57,1.57,1.57,1.57,1.56,1.58,1.58,1.58,1.58,1.53,1.48,1.48,1.48,1.48,1.48,1.57,1.57,1.57,1.60,1.60,1.65,1.71,1.71,1.71,1.74,1.78,1.84,1.84,1.76,1.72,1.66,1.65,1.66,1.66,1.66,1.61,1.55,1.56,1.55,1.55,1.61,1.54,1.48,1.42,1.42,1.42,1.43,1.46,1.50,1.47,1.43,1.42,1.39,1.37,1.38,1.51,1.47,1.47,1.53,1.55,1.50,1.52,1.53,1.53,1.52,1.60,1.52,1.64,1.63,1.69,1.73,1.69,1.61,1.52,1.55,1.56,1.56,1.56,1.54,1.53,1.54,1.48,1.38,1.34,1.28,1.28,1.30,1.31,1.31,1.31,1.32,1.31,1.27,1.24,1.24,1.24,1.24,1.24,1.24,1.24,1.23,1.26,1.28,1.32,1.40,1.41,1.37,1.33,1.33,1.34,1.34,1.38,1.43,1.39,1.33,1.33,1.34,1.38,1.37,1.38,1.31,1.38,1.30,1.30,1.29,1.31,1.31,1.32,1.31,1.30,1.31,1.33,1.34,1.42,1.42,1.36,1.36,1.34,1.34,1.33,1.31,1.25,1.23,1.17,1.19,1.19,1.19,1.19) > 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] 156 > (np <- floor(n / par1)) [1] 13 > 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] 13 13 13 13 13 13 13 13 13 13 13 13 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 1.56 1.56 1.57 1.76 1.61 1.39 1.52 1.56 1.31 1.23 1.43 1.29 1.36 [2,] 1.56 1.58 1.57 1.72 1.54 1.37 1.60 1.56 1.31 1.26 1.39 1.31 1.34 [3,] 1.54 1.58 1.60 1.66 1.48 1.38 1.52 1.54 1.32 1.28 1.33 1.31 1.34 [4,] 1.54 1.58 1.60 1.65 1.42 1.51 1.64 1.53 1.31 1.32 1.33 1.32 1.33 [5,] 1.54 1.58 1.65 1.66 1.42 1.47 1.63 1.54 1.27 1.40 1.34 1.31 1.31 [6,] 1.54 1.53 1.71 1.66 1.42 1.47 1.69 1.48 1.24 1.41 1.38 1.30 1.25 [7,] 1.57 1.48 1.71 1.66 1.43 1.53 1.73 1.38 1.24 1.37 1.37 1.31 1.23 [8,] 1.58 1.48 1.71 1.61 1.46 1.55 1.69 1.34 1.24 1.33 1.38 1.33 1.17 [9,] 1.57 1.48 1.74 1.55 1.50 1.50 1.61 1.28 1.24 1.33 1.31 1.34 1.19 [10,] 1.57 1.48 1.78 1.56 1.47 1.52 1.52 1.28 1.24 1.34 1.38 1.42 1.19 [11,] 1.57 1.48 1.84 1.55 1.43 1.53 1.55 1.30 1.24 1.34 1.30 1.42 1.19 [12,] 1.57 1.57 1.84 1.55 1.42 1.53 1.56 1.31 1.24 1.38 1.30 1.36 1.19 [,14] [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.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/1r50b1483966860.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/2k30x1483966860.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/3fte01483966860.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/452lj1483966860.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] [,12] [1,] 1.23 1.26 1.28 1.31 1.27 1.24 1.23 1.17 1.19 1.19 1.19 1.19 [2,] 1.36 1.34 1.33 1.33 1.34 1.38 1.37 1.33 1.31 1.34 1.30 1.31 [3,] 1.52 1.54 1.48 1.51 1.47 1.47 1.43 1.46 1.48 1.47 1.43 1.42 [4,] 1.56 1.57 1.54 1.58 1.58 1.54 1.57 1.58 1.55 1.52 1.55 1.56 [5,] 1.76 1.72 1.66 1.65 1.66 1.71 1.73 1.71 1.74 1.78 1.84 1.84 $n [1] 13 13 13 13 13 13 13 13 13 13 13 13 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.432357 1.439211 1.387975 1.400447 1.364829 1.399886 1.342357 1.350447 [2,] 1.607643 1.640789 1.572025 1.619553 1.575171 1.540114 1.517643 1.569553 [,9] [,10] [,11] [,12] [1,] 1.374829 1.391122 1.320447 1.310447 [2,] 1.585171 1.548878 1.539553 1.529553 $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(1.23, 1.36, 1.52, 1.56, 1.76, 1.26, 1.34, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5ghxi1483966860.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] [,11] [,12] [1,] 1.540 1.480 1.57 1.550 1.420 1.370 1.520 1.280 1.24 1.230 1.300 1.290 [2,] 1.540 1.480 1.60 1.555 1.420 1.430 1.535 1.305 1.24 1.300 1.320 1.310 [3,] 1.565 1.545 1.71 1.655 1.445 1.505 1.605 1.430 1.24 1.335 1.355 1.315 [4,] 1.570 1.580 1.76 1.660 1.490 1.530 1.665 1.540 1.31 1.375 1.380 1.350 [5,] 1.580 1.580 1.84 1.760 1.540 1.550 1.730 1.560 1.32 1.410 1.430 1.360 [,13] [,14] [1,] 1.170 NA [2,] 1.190 NA [3,] 1.240 NA [4,] 1.335 NA [5,] 1.360 NA $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1.551317 1.499389 1.637023 1.607109 1.413073 1.459389 1.545706 1.322815 [2,] 1.578683 1.590611 1.782977 1.702891 1.476927 1.550611 1.664294 1.537185 [,9] [,10] [,11] [,12] [,13] [,14] [1,] 1.208073 1.300792 1.327634 1.296756 1.173865 NA [2,] 1.271927 1.369208 1.382366 1.333244 1.306135 NA $out [1] 1.61 1.42 1.42 $group [1] 5 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" NA Warning message: In bxp(list(stats = c(1.54, 1.54, 1.565, 1.57, 1.58, 1.48, 1.48, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6q54h1483966860.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,] 0.1298174 0.340 0.160 [2,] 0.1417878 0.425 0.200 [3,] 0.1580119 0.515 0.235 [4,] 0.1691871 0.570 0.250 [5,] 0.1772547 0.650 0.250 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 0.1455149 0.4488645 0.2121947 [2,] 0.1705089 0.5811355 0.2578053 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(0.129817426035814, 0.141787849737784, 0.158011896474, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1r50b1483966860.ps tmp/1r50b1483966860.png",intern=TRUE)) character(0) > try(system("convert tmp/2k30x1483966860.ps tmp/2k30x1483966860.png",intern=TRUE)) character(0) > try(system("convert tmp/3fte01483966860.ps tmp/3fte01483966860.png",intern=TRUE)) character(0) > try(system("convert tmp/452lj1483966860.ps tmp/452lj1483966860.png",intern=TRUE)) character(0) > try(system("convert tmp/5ghxi1483966860.ps tmp/5ghxi1483966860.png",intern=TRUE)) character(0) > try(system("convert tmp/6q54h1483966860.ps tmp/6q54h1483966860.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.652 0.252 3.061