R version 2.12.1 (2010-12-16) Copyright (C) 2010 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(990,1050,1000,1040,1030,980,990,940,1050,990,980,1110,1000,1000,1080,1010,960,990,900,920,1080,950,950,1060,1070,970,1070,980,970,1050,950,960,1170,990,870,1090,1070,990,1080,890,920,1100,930,950,1240,950,830,1220,1040,1080,1160,900,790,1100,1000,990,1250,970,840,1220,1100,1030,1210,830,810,1100,1020,950,1280,950,720,1150,1030,1030,1200,870,880,1090,950,1060,1280,920,630,1110,1020,1130,1160,930,930,1110,930,1070,1250,840,680,1110,990,1210,1130,920,1030,1120,880,1050,1260,790,640,1110) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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] 9 9 9 9 9 9 9 9 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 990 1000 1070 1070 1040 1100 1030 1020 990 NA [2,] 1050 1000 970 990 1080 1030 1030 1130 1210 NA [3,] 1000 1080 1070 1080 1160 1210 1200 1160 1130 NA [4,] 1040 1010 980 890 900 830 870 930 920 NA [5,] 1030 960 970 920 790 810 880 930 1030 NA [6,] 980 990 1050 1100 1100 1100 1090 1110 1120 NA [7,] 990 900 950 930 1000 1020 950 930 880 NA [8,] 940 920 960 950 990 950 1060 1070 1050 NA [9,] 1050 1080 1170 1240 1250 1280 1280 1250 1260 NA [10,] 990 950 990 950 970 950 920 840 790 NA [11,] 980 950 870 830 840 720 630 680 640 NA [12,] 1110 1060 1090 1220 1220 1150 1110 1110 1110 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 60 0 -100 -80 40 -70 0 110 220 NA [2,] -50 80 100 90 80 180 170 30 -80 NA [3,] 40 -70 -90 -190 -260 -380 -330 -230 -210 NA [4,] -10 -50 -10 30 -110 -20 10 0 110 NA [5,] -50 30 80 180 310 290 210 180 90 NA [6,] 10 -90 -100 -170 -100 -80 -140 -180 -240 NA [7,] -50 20 10 20 -10 -70 110 140 170 NA [8,] 110 160 210 290 260 330 220 180 210 NA [9,] -60 -130 -180 -290 -280 -330 -360 -410 -470 NA [10,] -10 0 -120 -120 -130 -230 -290 -160 -150 NA [11,] 130 110 220 390 380 430 480 430 470 NA [12,] -110 10 -20 -180 -120 -120 -90 -120 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/rcomp/tmp/1d18a1313515614.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/www/rcomp/tmp/2lnjl1313515614.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/www/rcomp/tmp/3gy7s1313515614.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/www/rcomp/tmp/46gmq1313515614.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,] 990 970 1000 830 790 980 880 920 1050 920 630 1060 [2,] 1000 1000 1080 890 880 1050 930 950 1170 920 680 1110 [3,] 1030 1030 1130 920 930 1100 950 960 1250 950 830 1110 [4,] 1070 1080 1160 980 970 1100 990 1050 1260 970 870 1150 [5,] 1100 1130 1210 1040 1030 1120 1020 1070 1280 990 980 1150 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 993.1333 987.8667 1087.867 872.6 882.6 1073.667 918.4 907.3333 1202.6 [2,] 1066.8667 1072.1333 1172.133 967.4 977.4 1126.333 981.6 1012.6667 1297.4 [,10] [,11] [,12] [1,] 923.6667 729.9333 1088.933 [2,] 976.3333 930.0667 1131.067 $out [1] 1210 840 790 1220 1220 $group [1] 2 10 10 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(990, 1000, 1030, 1070, 1100, 970, 1000, 1030, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/55p4y1313515614.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,] -100 -50 -380 -50 -50 -240 -70 110 -470 -160 110 -180 [2,] -70 30 -260 -20 80 -170 -10 180 -360 -160 220 -120 [3,] 0 80 -210 -10 180 -100 20 210 -290 -130 390 -115 [4,] 60 100 -90 10 210 -90 110 260 -180 -120 430 -55 [5,] 220 180 40 30 310 10 170 330 -60 -120 480 10 $n [1] 9 9 9 9 9 9 9 9 9 9 9 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -68.46667 43.13333 -299.5333 -25.8 111.5333 -142.13333 -43.2 167.8667 [2,] 68.46667 116.86667 -120.4667 5.8 248.4667 -57.86667 83.2 252.1333 [,9] [,10] [,11] [,12] [1,] -384.8 -151.0667 279.4 -151.30993 [2,] -195.2 -108.9333 500.6 -78.69007 $out [1] -80 -110 110 -10 0 -230 -290 $group [1] 2 4 4 10 10 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-100, -70, 0, 60, 220, -50, 30, 80, 100, 180, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6pgrh1313515614.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,] 940 900 870 830 790 720 630 680 640 NA [2,] 985 950 965 925 935 890 900 930 900 NA [3,] 995 995 985 970 1020 1025 1030 1045 1040 NA [4,] 1045 1035 1070 1090 1130 1125 1100 1120 1125 NA [5,] 1110 1080 1170 1240 1250 1280 1280 1250 1260 NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 967.6336 956.231 937.1088 894.7424 931.0592 917.815 938.7787 [2,] 1022.3664 1033.769 1032.8912 1045.2576 1108.9408 1132.185 1121.2213 [,8] [,9] [,10] [1,] 958.3397 937.376 NA [2,] 1131.6603 1142.624 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(940, 985, 995, 1045, 1110, 900, 950, 995, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7n31z1313515614.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,] 793.3333 830 775.0 [2,] 928.8889 940 940.0 [3,] 1011.1111 995 1017.5 [4,] 1096.1111 1105 1097.5 [5,] 1206.6667 1250 1215.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 934.840 919.7424 945.6632 [2,] 1087.382 1070.2576 1089.3368 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(793.333333333333, 928.888888888889, 1011.11111111111, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1d18a1313515614.ps tmp/1d18a1313515614.png",intern=TRUE)) character(0) > try(system("convert tmp/2lnjl1313515614.ps tmp/2lnjl1313515614.png",intern=TRUE)) character(0) > try(system("convert tmp/3gy7s1313515614.ps tmp/3gy7s1313515614.png",intern=TRUE)) character(0) > try(system("convert tmp/46gmq1313515614.ps tmp/46gmq1313515614.png",intern=TRUE)) character(0) > try(system("convert tmp/55p4y1313515614.ps tmp/55p4y1313515614.png",intern=TRUE)) character(0) > try(system("convert tmp/6pgrh1313515614.ps tmp/6pgrh1313515614.png",intern=TRUE)) character(0) > try(system("convert tmp/7n31z1313515614.ps tmp/7n31z1313515614.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.176 0.428 2.578