R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(5740,5639,5538,5336,7380,7279,5740,4718,4819,4819,4920,5133,4516,3898,3392,3392,5336,5538,3999,2258,3179,3179,3898,4313,4212,3179,3696,3493,5234,4819,3179,1954,3078,3392,3696,4100,3280,2572,2876,2977,5639,5639,4100,3898,4516,4212,5032,6054,6257,4819,4414,3999,6773,6976,6459,6976,6874,6054,6976,7998,8413,7178,6358,6976,9638,10458,10256,10660,10559,9537,11278,11693,12300,10458,9739,10559,12513,14254,13839,13839,14042,13333,15176,15176,14862,13120,13434,13637,14973,16714,15479,16097,15580,15277,17636,17119,16400,15378,16400,16917,17534,18354,17534,18040,17423,17322,19883,20096,19276,17838,19063,19579,20197,21118,20197,20916,20602,19478,21837,21837) > 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)) > 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] 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,] 5740 4516 4212 3280 6257 8413 12300 14862 16400 19276 NA [2,] 5639 3898 3179 2572 4819 7178 10458 13120 15378 17838 NA [3,] 5538 3392 3696 2876 4414 6358 9739 13434 16400 19063 NA [4,] 5336 3392 3493 2977 3999 6976 10559 13637 16917 19579 NA [5,] 7380 5336 5234 5639 6773 9638 12513 14973 17534 20197 NA [6,] 7279 5538 4819 5639 6976 10458 14254 16714 18354 21118 NA [7,] 5740 3999 3179 4100 6459 10256 13839 15479 17534 20197 NA [8,] 4718 2258 1954 3898 6976 10660 13839 16097 18040 20916 NA [9,] 4819 3179 3078 4516 6874 10559 14042 15580 17423 20602 NA [10,] 4819 3179 3392 4212 6054 9537 13333 15277 17322 19478 NA [11,] 4920 3898 3696 5032 6976 11278 15176 17636 19883 21837 NA [12,] 5133 4313 4100 6054 7998 11693 15176 17119 20096 21837 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -101 -618 -1033 -708 -1438 -1235 -1842 -1742 -1022 -1438 NA [2,] -101 -506 517 304 -405 -820 -719 314 1022 1225 NA [3,] -202 0 -203 101 -415 618 820 203 517 516 NA [4,] 2044 1944 1741 2662 2774 2662 1954 1336 617 618 NA [5,] -101 202 -415 0 203 820 1741 1741 820 921 NA [6,] -1539 -1539 -1640 -1539 -517 -202 -415 -1235 -820 -921 NA [7,] -1022 -1741 -1225 -202 517 404 0 618 506 719 NA [8,] 101 921 1124 618 -102 -101 203 -517 -617 -314 NA [9,] 0 0 314 -304 -820 -1022 -709 -303 -101 -1124 NA [10,] 101 719 304 820 922 1741 1843 2359 2561 2359 NA [11,] 213 415 404 1022 1022 415 0 -517 213 0 NA [12,] -617 -101 -820 203 415 607 -314 -719 -820 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/wessaorg/rcomp/tmp/1jait1313051755.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2p10x1313051755.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/3lotc1313051755.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/4g0rc1313051755.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] [1,] 3280 2572.0 2876 2977 5234 4819.0 3179.0 1954 3078.0 3179.0 [2,] 4516 3898.0 3696 3493 5639 5639.0 4100.0 3898 4516.0 4212.0 [3,] 7335 6408.5 5948 6156 8509 8868.5 8357.5 8818 8716.5 7795.5 [4,] 14862 13120.0 13434 13637 14973 16714.0 15479.0 16097 15580.0 15277.0 [5,] 19276 17838.0 19063 19579 20197 21118.0 20197.0 20916 20602.0 19478.0 [,11] [,12] [1,] 3696 4100.0 [2,] 4920 5133.0 [3,] 9127 9845.5 [4,] 17636 17119.0 [5,] 21837 21837.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2165.726 1800.821 1082.507 1087.653 3845.361 3334.988 2672.098 [2,] 12504.274 11016.179 10813.493 11224.347 13172.639 14402.012 14042.902 [,8] [,9] [,10] [,11] [,12] [1,] 2722.893 3188.484 2266.985 2773.579 3856.817 [2,] 14913.107 14244.516 13324.015 15480.421 15834.183 $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(3280, 4516, 7335, 14862, 19276, 2572, 3898, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5xuef1313051755.ps",horizontal=F,onefile=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,] -1842 -820.0 -415 617 -415.0 -1640 -1741 -617 -1124.0 101.0 -517.0 -820 [2,] -1438 -506.0 -202 1336 0.0 -1539 -1022 -314 -820.0 719.0 0.0 -719 [3,] -1134 101.5 152 1949 511.5 -1078 202 0 -303.5 1331.5 308.5 -314 [4,] -708 517.0 517 2662 921.0 -517 517 618 0.0 2359.0 415.0 203 [5,] -101 1225.0 820 2774 1741.0 -202 719 1124 314.0 2561.0 1022.0 607 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1498.7371 -409.6316 -207.2411 1286.478 51.33168 -1588.6319 -566.9458 [2,] -769.2629 612.6316 511.2411 2611.522 971.66832 -567.3681 970.9458 [,8] [,9] [,10] [,11] [,12] [1,] -465.6644 -713.2047 512.0906 101.1495 -799.5867 [2,] 465.6644 106.2047 2150.9094 515.8505 171.5867 $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(-1842, -1438, -1134, -708, -101, -820, -506, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6qhlu1313051755.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,] 4718.0 2258.0 1954.0 2572.0 3999.0 6358.0 9739.0 13120.0 15378.0 17838 [2,] 4869.5 3285.5 3179.0 3128.5 5436.5 7795.5 11429.5 14249.5 16658.5 19377 [3,] 5437.0 3898.0 3594.5 4156.0 6616.0 9947.0 13586.0 15378.0 17478.5 20197 [4,] 5740.0 4414.5 4156.0 5335.5 6976.0 10609.5 14148.0 16405.5 18197.0 21017 [5,] 5740.0 5538.0 5234.0 6054.0 7998.0 11693.0 15176.0 17636.0 20096.0 21837 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 5039.959 3383.056 3148.884 3149.372 5913.824 8663.516 12346.07 14394.63 [2,] 5834.041 4412.944 4040.116 5162.628 7318.176 11230.484 14825.93 16361.37 [,9] [,10] [,11] [1,] 16776.78 19448.98 NA [2,] 18180.22 20945.02 NA $out [1] 7380 7279 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(4718, 4869.5, 5437, 5740, 5740, 2258, 3285.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7y1wm1313051755.ps",horizontal=F,onefile=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,] 8407.90 5948.00 8192.875 [2,] 9106.05 6871.75 8906.562 [3,] 10001.40 8433.25 9803.625 [4,] 10777.45 8843.25 10562.375 [5,] 11351.90 9845.50 11036.125 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 9239.063 7534.036 9048.398 [2,] 10763.737 9332.464 10558.852 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(8407.9, 9106.05, 10001.4, 10777.45, 11351.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1jait1313051755.ps tmp/1jait1313051755.png",intern=TRUE)) character(0) > try(system("convert tmp/2p10x1313051755.ps tmp/2p10x1313051755.png",intern=TRUE)) character(0) > try(system("convert tmp/3lotc1313051755.ps tmp/3lotc1313051755.png",intern=TRUE)) character(0) > try(system("convert tmp/4g0rc1313051755.ps tmp/4g0rc1313051755.png",intern=TRUE)) character(0) > try(system("convert tmp/5xuef1313051755.ps tmp/5xuef1313051755.png",intern=TRUE)) character(0) > try(system("convert tmp/6qhlu1313051755.ps tmp/6qhlu1313051755.png",intern=TRUE)) character(0) > try(system("convert tmp/7y1wm1313051755.ps tmp/7y1wm1313051755.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.621 0.345 1.974