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(3922,3759,4138,4634,3996,4308,4143,4429,5219,4929,5755,5592,4163,4962,5208,4755,4491,5732,5731,5040,6102,4904,5369,5578,4619,4731,5011,5299,4146,4625,4736,4219,5116,4205,4121,5103,4300,4578,3809,5526,4247,3830,4394,4826,4409,4569,4106,4794,3914,3793,4405,4022,4100,4788,3163,3585,3903,4178,3863,4187) > 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,] 3922 4163 4619 4300 3914 NA [2,] 3759 4962 4731 4578 3793 NA [3,] 4138 5208 5011 3809 4405 NA [4,] 4634 4755 5299 5526 4022 NA [5,] 3996 4491 4146 4247 4100 NA [6,] 4308 5732 4625 3830 4788 NA [7,] 4143 5731 4736 4394 3163 NA [8,] 4429 5040 4219 4826 3585 NA [9,] 5219 6102 5116 4409 3903 NA [10,] 4929 4904 4205 4569 4178 NA [11,] 5755 5369 4121 4106 3863 NA [12,] 5592 5578 5103 4794 4187 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -163 799 112 278 -121 NA [2,] 379 246 280 -769 612 NA [3,] 496 -453 288 1717 -383 NA [4,] -638 -264 -1153 -1279 78 NA [5,] 312 1241 479 -417 688 NA [6,] -165 -1 111 564 -1625 NA [7,] 286 -691 -517 432 422 NA [8,] 790 1062 897 -417 318 NA [9,] -290 -1198 -911 160 275 NA [10,] 826 465 -84 -463 -315 NA [11,] -163 209 982 688 324 NA [12,] -1429 -959 -803 -880 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/16nk21257596304.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/270ay1257596304.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/3xvcu1257596304.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/4209d1257596304.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,] 3914 3759 3809 4022 3996 3830 4143 3585 3903 4178 3863 4187 [2,] 3922 3793 4138 4634 4100 4308 4143 4219 4409 4205 4106 4794 [3,] 4163 4578 4405 4755 4146 4625 4394 4429 5116 4569 4121 5103 [4,] 4300 4731 5011 5299 4247 4788 4736 4826 5219 4904 5369 5578 [5,] 4619 4962 5208 5526 4247 4788 4736 5040 6102 4929 5755 5592 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 3895.906 3915.212 3788.140 4285.113 4042.13 4285.833 3974.988 4000.095 [2,] 4430.094 5240.788 5021.860 5224.887 4249.87 4964.167 4813.012 4857.905 [,9] [,10] [,11] [,12] [1,] 4543.656 4075.088 3228.567 4549.028 [2,] 5688.344 5062.912 5013.433 5656.972 $out [1] 4491 5732 5731 3163 $group [1] 5 6 7 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(3914, 3922, 4163, 4300, 4619, 3759, 3793, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/53dvt1257596304.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,] -163 246 -453 -1279 312 -165 -691 -417 -1198 -463 -163 -1429.0 [2,] -121 246 -383 -1153 312 -165 -517 318 -911 -315 209 -1194.0 [3,] 112 280 288 -638 479 -1 286 790 -290 -84 324 -919.5 [4,] 278 379 496 -264 688 111 422 897 160 465 688 -841.5 [5,] 799 379 1717 78 1241 111 432 1062 275 826 982 -803.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -169.9324 186.0225 -333.0992 -1266.16516 213.3193 -196.0209 -377.495 [2,] 393.9324 373.9775 909.0992 -9.83484 744.6807 194.0209 949.495 [,8] [,9] [,10] [,11] [,12] [1,] 380.8801 -1046.7659 -635.146 -14.46019 -1197.975 [2,] 1199.1199 466.7659 467.146 662.46019 -641.025 $out [1] -769 612 -417 564 -1625 $group [1] 2 2 5 6 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-163, -121, 112, 278, 799, 246, 246, 280, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6xb241257596304.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] [1,] 3759.0 4163.0 4121 3809.0 3585.0 NA [2,] 4067.0 4829.5 4212 4176.5 3828.0 NA [3,] 4368.5 5124.0 4678 4401.5 3968.0 NA [4,] 5074.0 5654.5 5057 4686.0 4182.5 NA [5,] 5755.0 6102.0 5299 4826.0 4405.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 3909.201 4747.712 4292.59 4169.114 3806.31 NA [2,] 4827.799 5500.288 5063.41 4633.886 4129.69 NA $out [1] 5526 4788 3163 $group [1] 4 5 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(3759, 4067, 4368.5, 5074, 5755, 4163, 4829.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7c05e1257596304.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,] 4183.6 4121.0 4111.00 [2,] 4392.2 4278.5 4350.75 [3,] 4535.6 4499.0 4551.25 [4,] 4751.9 4690.0 4775.75 [5,] 5050.8 5116.0 5186.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 4371.538 4311.312 4357.405 [2,] 4699.662 4686.688 4745.095 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(4183.6, 4392.2, 4535.6, 4751.9, 5050.8, 4121, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/16nk21257596304.ps tmp/16nk21257596304.png") > system("convert tmp/270ay1257596304.ps tmp/270ay1257596304.png") > system("convert tmp/3xvcu1257596304.ps tmp/3xvcu1257596304.png") > system("convert tmp/4209d1257596304.ps tmp/4209d1257596304.png") > system("convert tmp/53dvt1257596304.ps tmp/53dvt1257596304.png") > system("convert tmp/6xb241257596304.ps tmp/6xb241257596304.png") > system("convert tmp/7c05e1257596304.ps tmp/7c05e1257596304.png") > > > proc.time() user system elapsed 1.111 0.865 1.627