R version 2.11.1 (2010-05-31) Copyright (C) 2010 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. 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(180.9,187,189.9,193.8,194.5,198.7,204.7,213.2,214.7,211,213.2,206.2,210.8,216.2,213.3,213.1,238.5,253,262.7,263.2,263.2,267.9,268,248.4,230.8,190.6,173.5,164.7,161.6,157.6,158.4,167,176.8,184.4,183.6,197,195.4,201.7,207.6,215.3,218.6,210.6,216.5,243.7,233.2,230.4,246.6,256.1,264.8,271.5) > 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] 50 > (np <- floor(n / par1)) [1] 4 > arr <- array(NA,dim=c(par1,np+1)) > darr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > dx <- diff(x) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + darr[j,ari[j]] <- dx[i] + if (j == par1) j = 0 + } > ari [1] 5 5 4 4 4 4 4 4 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 180.9 210.8 230.8 195.4 264.8 [2,] 187.0 216.2 190.6 201.7 271.5 [3,] 189.9 213.3 173.5 207.6 NA [4,] 193.8 213.1 164.7 215.3 NA [5,] 194.5 238.5 161.6 218.6 NA [6,] 198.7 253.0 157.6 210.6 NA [7,] 204.7 262.7 158.4 216.5 NA [8,] 213.2 263.2 167.0 243.7 NA [9,] 214.7 263.2 176.8 233.2 NA [10,] 211.0 267.9 184.4 230.4 NA [11,] 213.2 268.0 183.6 246.6 NA [12,] 206.2 248.4 197.0 256.1 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] 6.1 5.4 -40.2 6.3 6.7 [2,] 2.9 -2.9 -17.1 5.9 NA [3,] 3.9 -0.2 -8.8 7.7 NA [4,] 0.7 25.4 -3.1 3.3 NA [5,] 4.2 14.5 -4.0 -8.0 NA [6,] 6.0 9.7 0.8 5.9 NA [7,] 8.5 0.5 8.6 27.2 NA [8,] 1.5 0.0 9.8 -10.5 NA [9,] -3.7 4.7 7.6 -2.8 NA [10,] 2.2 0.1 -0.8 16.2 NA [11,] -7.0 -19.6 13.4 9.5 NA [12,] 4.6 -17.6 -1.6 8.7 NA > arr.mean <- array(NA,dim=par1) > arr.median <- array(NA,dim=par1) > arr.midrange <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.mean[j] <- mean(arr[j,],na.rm=TRUE) + arr.median[j] <- median(arr[j,],na.rm=TRUE) + arr.midrange[j] <- (quantile(arr[j,],0.75,na.rm=TRUE) + quantile(arr[j,],0.25,na.rm=TRUE)) / 2 + } > overall.mean <- mean(x) > overall.median <- median(x) > overall.midrange <- (quantile(x,0.75) + quantile(x,0.25)) / 2 > postscript(file="/var/www/rcomp/tmp/1f7xu1290680014.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,type='b',ylab='mean',main='Mean Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.mean,0) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/2f7xu1290680014.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.median,type='b',ylab='median',main='Median Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.median,0) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/37yex1290680014.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.midrange,type='b',ylab='midrange',main='Midrange Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.midrange,0) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/47yex1290680014.ps",horizontal=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,] 180.9 187.0 173.50 164.70 161.60 157.60 158.40 167.00 176.80 184.40 183.6 [2,] 195.4 190.6 181.70 179.25 178.05 178.15 181.55 190.10 195.75 197.70 198.4 [3,] 210.8 201.7 198.75 203.45 206.55 204.65 210.60 228.45 223.95 220.70 229.9 [4,] 230.8 216.2 210.45 214.20 228.55 231.80 239.60 253.45 248.20 249.15 257.3 [5,] 264.8 216.2 213.30 215.30 238.50 253.00 262.70 263.20 263.20 267.90 268.0 [,12] [1,] 197.00 [2,] 201.60 [3,] 227.30 [4,] 252.25 [5,] 256.10 $n [1] 5 5 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 185.7864 183.6111 176.0375 175.8395 166.655 162.2665 164.7405 178.4035 [2,] 235.8136 219.7889 221.4625 231.0605 246.445 247.0335 256.4595 278.4965 [,9] [,10] [,11] [,12] [1,] 182.5145 180.0545 183.369 187.2865 [2,] 265.3855 261.3455 276.431 267.3135 $out [1] 271.5 $group [1] 2 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(180.9, 195.4, 210.8, 230.8, 264.8, 187, 190.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/57yex1290680014.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(darr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Differenced Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 5.4 -1.710000e+01 -8.80 -3.10 -8.00 0.80 0.50 -10.50 -3.70 -0.80 -19.60 [2,] 5.4 -1.000000e+01 -4.50 -1.20 -6.00 3.35 4.50 -5.25 -3.25 -0.35 -13.30 [3,] 6.1 1.421085e-14 1.85 2.00 0.10 5.95 8.55 0.75 0.95 1.15 1.25 [4,] 6.3 4.400000e+00 5.80 14.35 9.35 7.85 17.90 5.65 6.15 9.20 11.45 [5,] 6.7 5.900000e+00 7.70 25.40 14.50 9.70 27.20 9.80 7.60 16.20 13.40 [,12] [1,] -17.60 [2,] -9.60 [3,] 1.50 [4,] 6.65 [5,] 8.70 $n [1] 5 4 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 5.464062 -11.376 -6.287 -10.2845 -12.0265 2.395 -2.036 -7.861 -6.476 [2,] 6.735938 11.376 9.987 14.2845 12.2265 9.505 19.136 9.361 8.376 [,10] [,11] [,12] [1,] -6.3945 -18.3025 -11.3375 [2,] 8.6945 20.8025 14.3375 $out [1] -40.2 $group [1] 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(5.39999999999998, 5.39999999999998, 6.1, 6.29999999999998, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6i8d01290680014.ps",horizontal=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] [1,] 180.90 210.80 157.60 195.40 264.80 [2,] 191.85 214.75 163.15 209.10 264.80 [3,] 201.70 250.70 175.15 217.55 268.15 [4,] 212.10 263.20 187.50 238.45 271.50 [5,] 214.70 268.00 197.00 256.10 271.50 $n [1] 12 12 12 12 2 $conf [,1] [,2] [,3] [,4] [,5] [1,] 192.4638 228.6016 164.0438 204.1633 260.6646 [2,] 210.9362 272.7984 186.2562 230.9367 275.6354 $out [1] 230.8 $group [1] 3 $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(180.9, 191.85, 201.7, 212.1, 214.7, 210.8, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7i8d01290680014.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.mean,arr.median,arr.midrange)) > names(z) <- list('mean','median','midrange') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Central Tendency',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 196.0750 198.750 197.4125 [2,] 204.1375 204.050 204.1062 [3,] 214.9700 210.700 211.8438 [4,] 222.7000 225.625 224.0375 [5,] 227.8500 229.900 228.8750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 206.5035 200.8595 202.7530 [2,] 223.4365 220.5405 220.9345 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(196.075, 204.1375, 214.97, 222.7, 227.85, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1f7xu1290680014.ps tmp/1f7xu1290680014.png",intern=TRUE)) character(0) > try(system("convert tmp/2f7xu1290680014.ps tmp/2f7xu1290680014.png",intern=TRUE)) character(0) > try(system("convert tmp/37yex1290680014.ps tmp/37yex1290680014.png",intern=TRUE)) character(0) > try(system("convert tmp/47yex1290680014.ps tmp/47yex1290680014.png",intern=TRUE)) character(0) > try(system("convert tmp/57yex1290680014.ps tmp/57yex1290680014.png",intern=TRUE)) character(0) > try(system("convert tmp/6i8d01290680014.ps tmp/6i8d01290680014.png",intern=TRUE)) character(0) > try(system("convert tmp/7i8d01290680014.ps tmp/7i8d01290680014.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.870 1.450 3.319