R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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. Natural language support but running in an English locale 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(132.1,125,127.1,101.5,85.7,79.3,70.9,77.1,83.9,96.2,111.7,127.2,143.6,134.9,135.6,105.3,86.4,74.6,67.6,73.4,78.5,98.2,118.6,136.9,137.9,115.6,119.3,98.5,84.3,73.5,60.7,69.5,77.9,113.9,126.3,135.1,130.5,113.1,110,90.8,85.4,72.5,64.7,67.2,77.9,105.2,107.2,120.7,121.3,107.9,105.6,81.3,71.7,64.8,57.3,61.9,70.1,88.8,106.8,110.7,114.1,108,111.5,86.8,78.4,68,57.3,65.3,73.3,88.6,101.3,122.9,126.6,114.1,124.7,93.3,77.2,66.5,57.9,63.7,65.8,85,101,105.3,121,117.9,106,86.6,79.9,65.2,61.2,67.6,78.9,95.5,113.1,124.4,122,110.3,114,93.3,75.5,65.4,59.2,63.8,74.2,91.7,107,120.7,127.4,119.7,112.7,84.4,75.6,66.5,59.9,64.8,74.3,100.4,105.9,131.1) > par1 = '12' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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,] 132.1 143.6 137.9 130.5 121.3 114.1 126.6 121.0 122.0 127.4 NA [2,] 125.0 134.9 115.6 113.1 107.9 108.0 114.1 117.9 110.3 119.7 NA [3,] 127.1 135.6 119.3 110.0 105.6 111.5 124.7 106.0 114.0 112.7 NA [4,] 101.5 105.3 98.5 90.8 81.3 86.8 93.3 86.6 93.3 84.4 NA [5,] 85.7 86.4 84.3 85.4 71.7 78.4 77.2 79.9 75.5 75.6 NA [6,] 79.3 74.6 73.5 72.5 64.8 68.0 66.5 65.2 65.4 66.5 NA [7,] 70.9 67.6 60.7 64.7 57.3 57.3 57.9 61.2 59.2 59.9 NA [8,] 77.1 73.4 69.5 67.2 61.9 65.3 63.7 67.6 63.8 64.8 NA [9,] 83.9 78.5 77.9 77.9 70.1 73.3 65.8 78.9 74.2 74.3 NA [10,] 96.2 98.2 113.9 105.2 88.8 88.6 85.0 95.5 91.7 100.4 NA [11,] 111.7 118.6 126.3 107.2 106.8 101.3 101.0 113.1 107.0 105.9 NA [12,] 127.2 136.9 135.1 120.7 110.7 122.9 105.3 124.4 120.7 131.1 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/www/html/freestat/rcomp/tmp/1r8rs1291555873.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/www/html/freestat/rcomp/tmp/2jzrd1291555873.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/www/html/freestat/rcomp/tmp/3jzrd1291555873.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/www/html/freestat/rcomp/tmp/4jzrd1291555873.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,] 114.1 107.90 105.60 81.30 71.70 64.80 57.3 61.90 65.8 85.00 101.0 105.30 [2,] 121.3 110.30 110.00 86.60 75.60 65.40 57.9 63.80 73.3 88.80 105.9 120.70 [3,] 127.0 114.85 113.35 92.05 79.15 67.25 60.3 66.25 76.1 95.85 107.1 123.65 [4,] 132.1 119.70 124.70 98.50 85.40 73.50 64.7 69.50 78.5 100.40 113.1 131.10 [5,] 143.6 125.00 135.60 105.30 86.40 79.30 70.9 77.10 83.9 113.90 118.6 136.90 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 121.6039 110.1534 106.0053 86.10429 74.25353 63.20292 56.90245 63.40205 [2,] 132.3961 119.5466 120.6947 97.99571 84.04647 71.29708 63.69755 69.09795 [,9] [,10] [,11] [,12] [1,] 73.50187 90.05418 103.5026 118.4537 [2,] 78.69813 101.64582 110.6974 128.8463 $out [1] 134.9 126.3 $group [1] 2 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(114.1, 121.3, 127, 132.1, 143.6, 107.9, 110.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5cqqf1291555873.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] [1,] 70.90 67.60 60.7 64.70 57.30 57.30 57.90 61.20 59.20 59.9 NA [2,] 81.60 76.55 75.7 75.20 67.45 70.65 66.15 73.25 69.80 70.4 NA [3,] 98.85 101.75 106.2 98.00 85.05 87.70 89.15 91.05 92.50 92.4 NA [4,] 126.05 135.25 122.8 111.55 107.35 109.75 109.70 115.50 112.15 116.2 NA [5,] 132.10 143.60 137.9 130.50 121.30 122.90 126.60 124.40 122.00 131.1 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 78.57606 74.97654 84.71737 81.42052 66.85134 69.86623 69.28655 [2,] 119.12394 128.52346 127.68263 114.57948 103.24866 105.53377 109.01345 [,8] [,9] [,10] [,11] [1,] 71.77949 73.18388 71.51031 NA [2,] 110.32051 111.81612 113.28969 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(70.9, 81.6, 98.85, 126.05, 132.1, 67.6, 76.55, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6cqqf1291555873.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,] 4.622902 13.60 4.8250 [2,] 5.046063 14.95 6.1125 [3,] 7.799291 24.65 8.6875 [4,] 8.701829 29.20 10.2750 [5,] 9.986101 31.60 12.9750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 6.131871 18.15048 6.788956 [2,] 9.466711 31.14952 10.586044 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(4.62290192651999, 5.04606264260867, 7.79929093507186, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1r8rs1291555873.ps tmp/1r8rs1291555873.png",intern=TRUE)) character(0) > try(system("convert tmp/2jzrd1291555873.ps tmp/2jzrd1291555873.png",intern=TRUE)) character(0) > try(system("convert tmp/3jzrd1291555873.ps tmp/3jzrd1291555873.png",intern=TRUE)) character(0) > try(system("convert tmp/4jzrd1291555873.ps tmp/4jzrd1291555873.png",intern=TRUE)) character(0) > try(system("convert tmp/5cqqf1291555873.ps tmp/5cqqf1291555873.png",intern=TRUE)) character(0) > try(system("convert tmp/6cqqf1291555873.ps tmp/6cqqf1291555873.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.689 1.234 1.911