R version 2.8.1 (2008-12-22) Copyright (C) 2008 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(15836.8,17570.4,18252.1,16196.7,16643,17729,16446.1,15993.8,16373.5,17842.2,22321.5,22786.7,18274.1,22392.9,23899.3,21343.5,22952.3,21374.4,21164.1,20906.5,17877.4,20664.3,22160,19813.6,17735.4,19640.2,20844.4,19823.1,18594.6,21350.6,18574.1,18924.2,17343.4,19961.2,19932.1,19464.6,16165.4,17574.9,19795.4,19439.5,17170,21072.4,17751.8,17515.5,18040.3,19090.1,17746.5,19202.1,15141.6,16258.1,18586.5,17209.4,17838.7,19123.5,16583.6,15991.2,16704.4,17420.4,17872,17823.2) > 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,] 15836.8 18274.1 17735.4 16165.4 15141.6 NA [2,] 17570.4 22392.9 19640.2 17574.9 16258.1 NA [3,] 18252.1 23899.3 20844.4 19795.4 18586.5 NA [4,] 16196.7 21343.5 19823.1 19439.5 17209.4 NA [5,] 16643.0 22952.3 18594.6 17170.0 17838.7 NA [6,] 17729.0 21374.4 21350.6 21072.4 19123.5 NA [7,] 16446.1 21164.1 18574.1 17751.8 16583.6 NA [8,] 15993.8 20906.5 18924.2 17515.5 15991.2 NA [9,] 16373.5 17877.4 17343.4 18040.3 16704.4 NA [10,] 17842.2 20664.3 19961.2 19090.1 17420.4 NA [11,] 22321.5 22160.0 19932.1 17746.5 17872.0 NA [12,] 22786.7 19813.6 19464.6 19202.1 17823.2 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1733.6 4118.8 1904.8 1409.5 1116.5 NA [2,] 681.7 1506.4 1204.2 2220.5 2328.4 NA [3,] -2055.4 -2555.8 -1021.3 -355.9 -1377.1 NA [4,] 446.3 1608.8 -1228.5 -2269.5 629.3 NA [5,] 1086.0 -1577.9 2756.0 3902.4 1284.8 NA [6,] -1282.9 -210.3 -2776.5 -3320.6 -2539.9 NA [7,] -452.3 -257.6 350.1 -236.3 -592.4 NA [8,] 379.7 -3029.1 -1580.8 524.8 713.2 NA [9,] 1468.7 2786.9 2617.8 1049.8 716.0 NA [10,] 4479.3 1495.7 -29.1 -1343.6 451.6 NA [11,] 465.2 -2346.4 -467.5 1455.6 -48.8 NA [12,] -4512.6 -2078.2 -3299.2 -4060.5 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/1xgr61257962224.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/rcomp/tmp/2ed8t1257962224.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/rcomp/tmp/355cl1257962224.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/rcomp/tmp/4h95t1257962224.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] [1,] 15141.6 16258.1 18252.1 16196.7 16643.0 17729.0 16446.1 15991.2 16373.5 [2,] 15836.8 17570.4 18586.5 17209.4 17170.0 19123.5 16583.6 15993.8 16704.4 [3,] 16165.4 17574.9 19795.4 19439.5 17838.7 21072.4 17751.8 17515.5 17343.4 [4,] 17735.4 19640.2 20844.4 19823.1 18594.6 21350.6 18574.1 18924.2 17877.4 [5,] 18274.1 22392.9 23899.3 21343.5 18594.6 21374.4 21164.1 20906.5 18040.3 [,10] [,11] [,12] [1,] 17420.4 17746.5 19202.1 [2,] 17842.2 17872.0 19202.1 [3,] 19090.1 19932.1 19464.6 [4,] 19961.2 22160.0 19813.6 [5,] 20664.3 22321.5 19813.6 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 14823.85 16112.38 18199.97 17592.67 16832.08 19498.74 16345.32 15444.89 [2,] 17506.95 19037.42 21390.83 21286.33 18845.32 22646.06 19158.28 19586.11 [,9] [,10] [,11] [,12] [1,] 16514.56 17592.82 16902.21 19032.52 [2,] 18172.24 20587.38 22961.99 19896.68 $out [1] 22952.3 22786.7 17823.2 $group [1] 5 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(15141.6, 15836.8, 16165.4, 17735.4, 18274.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5r3q11257962224.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] [1,] 1116.5 681.7 -2555.8 -2269.5 1086.0 -3320.6 -592.4 -3029.1 716.0 -1343.6 [2,] 1409.5 1204.2 -2055.4 -1228.5 1086.0 -2776.5 -452.3 -1580.8 1049.8 -29.1 [3,] 1733.6 1506.4 -1377.1 446.3 1284.8 -2539.9 -257.6 379.7 1468.7 451.6 [4,] 1904.8 2220.5 -1021.3 629.3 2756.0 -1282.9 -236.3 524.8 2617.8 1495.7 [5,] 1904.8 2328.4 -355.9 1608.8 3902.4 -210.3 -236.3 713.2 2786.9 1495.7 [,11] [,12] [1,] -467.5 -4512.60 [2,] -467.5 -4286.55 [3,] -48.8 -3679.85 [4,] 465.2 -2688.70 [5,] 1455.6 -2078.20 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1383.622 788.285 -2107.7925 -866.4168 104.7822 -3595.274 -410.2251 [2,] 2083.578 2224.515 -646.4075 1759.0168 2464.8178 -1484.526 -104.9749 [,8] [,9] [,10] [,11] [,12] [1,] -1108.112 360.7551 -625.8198 -707.8435 -4942.151 [2,] 1867.512 2576.6449 1529.0198 610.2435 -2417.548 $out [1] 4118.8 -1577.9 350.1 4479.3 -2346.4 $group [1] 1 5 7 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1116.5, 1409.50000000000, 1733.60000000000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6vp931257962224.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,] 15836.80 17877.40 17343.40 16165.40 15141.60 NA [2,] 16285.10 20238.95 18584.35 17545.20 16420.85 NA [3,] 17106.70 21253.80 19552.40 17896.05 17314.90 NA [4,] 18047.15 22276.45 19946.65 19320.80 17855.35 NA [5,] 18252.10 23899.30 21350.60 21072.40 19123.50 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 16303.02 20324.48 18931.05 17086.19 16660.61 NA [2,] 17910.38 22183.12 20173.75 18705.91 17969.19 NA $out [1] 22321.5 22786.7 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(15836.8, 16285.1, 17106.7, 18047.15, 18252.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7jf4q1257962224.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,] 16630.66 16165.4 16786.10 [2,] 17985.09 17545.2 17518.92 [3,] 18744.87 18464.4 18560.78 [4,] 19912.23 19630.0 19611.65 [5,] 20275.54 21072.4 20237.05 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 17865.89 17513.51 17606.27 [2,] 19623.85 19415.29 19515.28 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(16630.66, 17985.09, 18744.87, 19912.23, 20275.54, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1xgr61257962224.ps tmp/1xgr61257962224.png") > system("convert tmp/2ed8t1257962224.ps tmp/2ed8t1257962224.png") > system("convert tmp/355cl1257962224.ps tmp/355cl1257962224.png") > system("convert tmp/4h95t1257962224.ps tmp/4h95t1257962224.png") > system("convert tmp/5r3q11257962224.ps tmp/5r3q11257962224.png") > system("convert tmp/6vp931257962224.ps tmp/6vp931257962224.png") > system("convert tmp/7jf4q1257962224.ps tmp/7jf4q1257962224.png") > > > proc.time() user system elapsed 1.510 1.390 2.805