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(1200,916,878,841,824,819,823,825,773,836,862,886,1010,846,911,856,881,830,830,827,773,797,826,947,1110,896,917,873,845,807,841,829,781,861,831,969,991,891,945,911,847,823,838,862,822,864,862,1044,1035,858,889,832,810,792,812,783,773,840,820,945) > 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] 60 > (np <- floor(n / par1)) [1] 5 > 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 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1200 1010 1110 991 1035 NA [2,] 916 846 896 891 858 NA [3,] 878 911 917 945 889 NA [4,] 841 856 873 911 832 NA [5,] 824 881 845 847 810 NA [6,] 819 830 807 823 792 NA [7,] 823 830 841 838 812 NA [8,] 825 827 829 862 783 NA [9,] 773 773 781 822 773 NA [10,] 836 797 861 864 840 NA [11,] 862 826 831 862 820 NA [12,] 886 947 969 1044 945 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -284 -164 -214 -100 -177 NA [2,] -38 65 21 54 31 NA [3,] -37 -55 -44 -34 -57 NA [4,] -17 25 -28 -64 -22 NA [5,] -5 -51 -38 -24 -18 NA [6,] 4 0 34 15 20 NA [7,] 2 -3 -12 24 -29 NA [8,] -52 -54 -48 -40 -10 NA [9,] 63 24 80 42 67 NA [10,] 26 29 -30 -2 -20 NA [11,] 24 121 138 182 125 NA [12,] 124 163 22 -9 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/13no11324411451.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/2z4691324411451.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/31wg31324411451.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/4gijv1324411451.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,] 991 846 878 832 810 792 812 825 773 836 820 945 [2,] 1010 858 889 841 824 807 823 825 773 836 826 945 [3,] 1035 891 911 856 845 819 830 827 773 840 831 947 [4,] 1110 896 917 873 847 823 838 829 781 861 862 969 [5,] 1200 916 945 911 881 830 841 829 781 864 862 969 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 964.3403 864.1493 891.2153 833.3889 828.7483 807.6944 819.401 824.1736 [2,] 1105.6597 917.8507 930.7847 878.6111 861.2517 830.3056 840.599 829.8264 [,9] [,10] [,11] [,12] [1,] 767.3472 822.3351 805.5625 930.0417 [2,] 778.6528 857.6649 856.4375 963.9583 $out [1] 862 783 822 797 886 1044 $group [1] 8 8 9 10 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(991, 1010, 1035, 1110, 1200, 846, 858, 891, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/54lr21324411451.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,] -284 21 -57 -28 -51 0 -29 -54 24 -30 121 -9.0 [2,] -214 21 -55 -28 -38 4 -12 -52 42 -20 121 6.5 [3,] -177 31 -44 -22 -24 15 -3 -48 63 -2 125 73.0 [4,] -164 54 -37 -17 -18 20 2 -40 67 26 138 143.5 [5,] -100 65 -34 -17 -5 34 2 -40 80 29 138 163.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -212.3299 7.682283 -56.71875 -29.77257 -38.13195 3.69444 -12.892365 [2,] -141.6701 54.317717 -31.28125 -14.22743 -9.86805 26.30556 6.892365 [,8] [,9] [,10] [,11] [,12] [1,] -56.47917 45.33506 -34.50348 112.9878 -35.23 [2,] -39.52083 80.66494 30.50348 137.0122 181.23 $out [1] -38 25 -64 24 -10 24 182 $group [1] 2 4 4 7 8 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-284, -214, -177, -164, -100, 21, 21, 31, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6pols1324411451.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] [1,] 773.0 773.0 781.0 822.0 773.0 NA [2,] 823.5 826.5 830.0 842.5 801.0 NA [3,] 838.5 838.0 853.0 863.0 826.0 NA [4,] 882.0 896.0 906.5 928.0 873.5 NA [5,] 916.0 947.0 969.0 1044.0 945.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 811.8178 806.3006 818.1078 824.0029 792.9323 NA [2,] 865.1822 869.6994 887.8922 901.9971 859.0677 NA $out [1] 1200 1010 1110 1035 $group [1] 1 2 3 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(773, 823.5, 838.5, 882, 916, 773, 826.5, 838, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7f5ks1324411451.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,] 784.4 773.0 777.00 [2,] 827.0 828.5 828.75 [3,] 840.8 842.5 846.25 [4,] 894.7 901.0 890.00 [5,] 958.2 947.0 957.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 809.9216 809.4323 818.3135 [2,] 871.6784 875.5677 874.1865 $out [1] 1069.2 1035.0 1060.0 $group [1] 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(784.4, 827, 840.8, 894.7, 958.2, 773, 828.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/13no11324411451.ps tmp/13no11324411451.png",intern=TRUE)) character(0) > try(system("convert tmp/2z4691324411451.ps tmp/2z4691324411451.png",intern=TRUE)) character(0) > try(system("convert tmp/31wg31324411451.ps tmp/31wg31324411451.png",intern=TRUE)) character(0) > try(system("convert tmp/4gijv1324411451.ps tmp/4gijv1324411451.png",intern=TRUE)) character(0) > try(system("convert tmp/54lr21324411451.ps tmp/54lr21324411451.png",intern=TRUE)) character(0) > try(system("convert tmp/6pols1324411451.ps tmp/6pols1324411451.png",intern=TRUE)) character(0) > try(system("convert tmp/7f5ks1324411451.ps tmp/7f5ks1324411451.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.558 0.333 1.900