R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(127,123,118,114,108,111,151,159,158,148,138,137,136,133,126,120,114,116,153,162,161,149,139,135,130,127,122,117,112,113,149,157,157,147,137,132,125,123,117,114,111,112,144,150,149,134,123,116,117,111,105,102,95,93,124,130,124,115,106,105,105,101,95,93,84,87,116,120,117,109,105,107) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 127 136 130 125 117 105 NA [2,] 123 133 127 123 111 101 NA [3,] 118 126 122 117 105 95 NA [4,] 114 120 117 114 102 93 NA [5,] 108 114 112 111 95 84 NA [6,] 111 116 113 112 93 87 NA [7,] 151 153 149 144 124 116 NA [8,] 159 162 157 150 130 120 NA [9,] 158 161 157 149 124 117 NA [10,] 148 149 147 134 115 109 NA [11,] 138 139 137 123 106 105 NA [12,] 137 135 132 116 105 107 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -4 -3 -3 -2 -6 -4 NA [2,] -5 -7 -5 -6 -6 -6 NA [3,] -4 -6 -5 -3 -3 -2 NA [4,] -6 -6 -5 -3 -7 -9 NA [5,] 3 2 1 1 -2 3 NA [6,] 40 37 36 32 31 29 NA [7,] 8 9 8 6 6 4 NA [8,] -1 -1 0 -1 -6 -3 NA [9,] -10 -12 -10 -15 -9 -8 NA [10,] -10 -10 -10 -11 -9 -4 NA [11,] -1 -4 -5 -7 -1 2 NA [12,] -1 -5 -7 1 0 NA 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/html/rcomp/tmp/1zf5f1258114983.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/html/rcomp/tmp/24ea01258114983.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/html/rcomp/tmp/39uxl1258114983.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/html/rcomp/tmp/4jldq1258114983.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] [,12] [1,] 105 101 95.0 93 84.0 87.0 116.0 120.0 117 109.0 105 105 [2,] 117 111 105.0 102 95.0 93.0 124.0 130.0 124 115.0 106 107 [3,] 126 123 117.5 114 109.5 111.5 146.5 153.5 153 140.5 130 124 [4,] 130 127 122.0 117 112.0 113.0 151.0 159.0 158 148.0 138 135 [5,] 136 133 126.0 120 114.0 116.0 153.0 162.0 161 149.0 139 137 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 117.6146 112.6795 106.5345 104.3245 98.53445 98.59935 129.0841 134.7941 [2,] 134.3854 133.3205 128.4655 123.6755 120.46555 124.40065 163.9159 172.2059 [,9] [,10] [,11] [,12] [1,] 131.0689 119.2139 109.3590 105.9391 [2,] 174.9311 161.7861 150.6410 142.0609 $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(105, 117, 126, 130, 136, 101, 111, 123, 127, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/514is1258114983.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] [,12] [1,] -4.0 -7 -6.0 -9 -2.0 29 4 -6 -15 -11 -7.0 -7 [2,] -4.0 -6 -5.0 -7 1.0 31 6 -3 -12 -10 -5.0 -5 [3,] -3.5 -6 -3.5 -6 1.5 34 7 -1 -10 -10 -2.5 -1 [4,] -3.0 -5 -3.0 -5 3.0 37 8 -1 -9 -9 -1.0 0 [5,] -2.0 -5 -2.0 -3 3.0 40 9 0 -8 -9 2.0 1 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -4.145032 -6.645032 -4.790065 -7.290065 0.2099354 30.12981 5.709935 [2,] -2.854968 -5.354968 -2.209935 -4.709935 2.7900646 37.87019 8.290065 [,8] [,9] [,10] [,11] [,12] [1,] -2.2900646 -11.935097 -10.645032 -5.0801292 -4.532987 [2,] 0.2900646 -8.064903 -9.354968 0.0801292 2.532987 $out [1] -6 -4 $group [1] 1 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-4, -4, -3.5, -3, -2, -7, -6, -6, -5, -5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6012o1258114983.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] [,6] [,7] [1,] 108.0 114.0 112.0 111 93.0 84.0 NA [2,] 116.0 123.0 119.5 115 103.5 94.0 NA [3,] 132.0 135.5 131.0 123 108.5 105.0 NA [4,] 149.5 151.0 148.0 139 120.5 112.5 NA [5,] 159.0 162.0 157.0 150 130.0 120.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 116.7204 122.729 118.0010 112.0534 100.7462 96.56203 NA [2,] 147.2796 148.271 143.9990 133.9466 116.2538 113.43797 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(108, 116, 132, 149.5, 159, 114, 123, 135.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7ax4i1258114983.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,] 104.0000 109.50 105.0000 [2,] 111.9167 115.75 112.5625 [3,] 122.6667 125.00 122.8750 [4,] 136.5833 143.50 136.7500 [5,] 146.3333 153.50 146.7500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 111.4160 112.3430 111.8429 [2,] 133.9173 137.6570 133.9071 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(104, 111.916666666667, 122.666666666667, 136.583333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1zf5f1258114983.ps tmp/1zf5f1258114983.png") > system("convert tmp/24ea01258114983.ps tmp/24ea01258114983.png") > system("convert tmp/39uxl1258114983.ps tmp/39uxl1258114983.png") > system("convert tmp/4jldq1258114983.ps tmp/4jldq1258114983.png") > system("convert tmp/514is1258114983.ps tmp/514is1258114983.png") > system("convert tmp/6012o1258114983.ps tmp/6012o1258114983.png") > system("convert tmp/7ax4i1258114983.ps tmp/7ax4i1258114983.png") > > > proc.time() user system elapsed 1.188 0.942 1.495