R version 2.10.1 (2009-12-14) 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(8027.7,8059.6,8059.5,7988.9,7950.2,8003.8,8037.5,8069,8157.6,8244.3,8329.4,8417,8432.5,8486.4,8531.1,8643.8,8727.9,8847.3,8904.3,9003.2,9025.3,9044.7,9120.7,9184.3,9247.2,9407.1,9488.9,9592.5,9666.2,9809.6,9932.7,10008.9,10103.4,10194.3,10328.8,10507.6,10601.2,10684,10819.9,11014.3,11043,11258.5,11267.9,11334.5,11297.2,11371.3,11340.1,11380.1,11477.9,11538.8,11596.4,11598.8,11645.8,11738.7,11935.5,12042.8,12127.6,12213.8,12303.5,12410.3,12534.1,12587.5,12683.2,12748.7,12915.9,12962.5,12965.9,13060.7,13099.9,13204,13321.1,13391.2,13366.9,13415.3,13324.6,13141.9,12925.4,12901.5,12973,13155) > par1 = '4' > #'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] 80 > (np <- floor(n / par1)) [1] 20 > 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] 20 20 20 20 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 8027.7 7950.2 8157.6 8432.5 8727.9 9025.3 9247.2 9666.2 10103.4 10601.2 [2,] 8059.6 8003.8 8244.3 8486.4 8847.3 9044.7 9407.1 9809.6 10194.3 10684.0 [3,] 8059.5 8037.5 8329.4 8531.1 8904.3 9120.7 9488.9 9932.7 10328.8 10819.9 [4,] 7988.9 8069.0 8417.0 8643.8 9003.2 9184.3 9592.5 10008.9 10507.6 11014.3 [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [1,] 11043.0 11297.2 11477.9 11645.8 12127.6 12534.1 12915.9 13099.9 13366.9 [2,] 11258.5 11371.3 11538.8 11738.7 12213.8 12587.5 12962.5 13204.0 13415.3 [3,] 11267.9 11340.1 11596.4 11935.5 12303.5 12683.2 12965.9 13321.1 13324.6 [4,] 11334.5 11380.1 11598.8 12042.8 12410.3 12748.7 13060.7 13391.2 13141.9 [,20] [,21] [1,] 12925.4 NA [2,] 12901.5 NA [3,] 12973.0 NA [4,] 13155.0 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 31.9 53.6 86.7 53.9 119.4 19.4 159.9 143.4 90.9 82.8 215.5 74.1 60.9 [2,] -0.1 33.7 85.1 44.7 57.0 76.0 81.8 123.1 134.5 135.9 9.4 -31.2 57.6 [3,] -70.6 31.5 87.6 112.7 98.9 63.6 103.6 76.2 178.8 194.4 66.6 40.0 2.4 [4,] -38.7 88.6 15.5 84.1 22.1 62.9 73.7 94.5 93.6 28.7 -37.3 97.8 47.0 [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [1,] 92.9 86.2 53.4 46.6 104.1 48.4 -23.9 NA [2,] 196.8 89.7 95.7 3.4 117.1 -90.7 71.5 NA [3,] 107.3 106.8 65.5 94.8 70.1 -182.7 182.0 NA [4,] 84.8 123.8 167.2 39.2 -24.3 -216.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/1jsaj1272468895.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/2jsaj1272468895.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/3jsaj1272468895.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/4c1r41272468895.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] [1,] 7950.20 8003.80 8037.50 7988.90 [2,] 8876.60 8946.00 9012.50 9093.75 [3,] 10822.10 10971.25 11043.90 11174.40 [4,] 12330.85 12400.65 12493.35 12579.50 [5,] 13366.90 13415.30 13324.60 13391.20 $n [1] 20 20 20 20 $conf [,1] [,2] [,3] [,4] [1,] 9601.718 9750.727 9814.12 9942.889 [2,] 12042.482 12191.773 12273.68 12405.911 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5c1r41272468895.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] [1,] 19.40 -90.70 2.40 -38.7 [2,] 50.90 21.55 51.80 18.8 [3,] 78.45 73.75 81.90 62.9 [4,] 98.50 106.40 107.05 91.1 [5,] 159.90 196.80 182.00 167.2 $n [1] 20 20 20 19 $conf [,1] [,2] [,3] [,4] [1,] 61.63298 43.7726 62.38024 36.69292 [2,] 95.26702 103.7274 101.41976 89.10708 $out [1] 215.5 -23.9 -70.6 194.4 -182.7 -216.5 $group [1] 1 1 3 3 3 4 $names [1] "1" "2" "3" "4" > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6na871272468895.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] [,7] [,8] [,9] [1,] 7988.90 7950.20 8157.60 8432.50 8727.90 9025.3 9247.20 9666.20 10103.40 [2,] 8008.30 7977.00 8200.95 8459.45 8787.60 9035.0 9327.15 9737.90 10148.85 [3,] 8043.60 8020.65 8286.85 8508.75 8875.80 9082.7 9448.00 9871.15 10261.55 [4,] 8059.55 8053.25 8373.20 8587.45 8953.75 9152.5 9540.70 9970.80 10418.20 [5,] 8059.60 8069.00 8417.00 8643.80 9003.20 9184.3 9592.50 10008.90 10507.60 [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [1,] 10601.20 11043.00 11297.20 11477.90 11645.80 12127.60 12534.10 12915.9 [2,] 10642.60 11150.75 11318.65 11508.35 11692.25 12170.70 12560.80 12939.2 [3,] 10751.95 11263.20 11355.70 11567.60 11837.10 12258.65 12635.35 12964.2 [4,] 10917.10 11301.20 11375.70 11597.60 11989.15 12356.90 12715.95 13013.3 [5,] 11014.30 11334.50 11380.10 11598.80 12042.80 12410.30 12748.70 13060.7 [,18] [,19] [,20] [,21] [1,] 13099.90 13141.90 12901.50 NA [2,] 13151.95 13233.25 12913.45 NA [3,] 13262.55 13345.75 12949.20 NA [4,] 13356.15 13391.10 13064.00 NA [5,] 13391.20 13415.30 13155.00 NA $n [1] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 8003.112 7960.412 8150.772 8407.63 8744.541 8989.875 9279.296 9687.159 [2,] 8084.088 8080.887 8422.927 8609.87 9007.059 9175.525 9616.704 10055.141 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [1,] 10048.76 10535.10 11144.34 11310.63 11497.09 11602.55 12111.55 12512.78 [2,] 10474.34 10968.80 11382.06 11400.77 11638.11 12071.65 12405.75 12757.92 [,17] [,18] [,19] [,20] [,21] [1,] 12905.66 13101.23 13221.05 12830.27 NA [2,] 13022.74 13423.87 13470.45 13068.13 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" NA Warning message: In bxp(list(stats = c(7988.9, 8008.3, 8043.6, 8059.55, 8059.6, 7950.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7na871272468895.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,] 10618.65 10822.10 10590.09 [2,] 10658.65 10896.67 10620.69 [3,] 10730.92 11007.58 10691.90 [4,] 10798.94 11109.15 10774.74 [5,] 10834.67 11174.40 10816.96 $n [1] 4 4 4 $conf [,1] [,2] [,3] [1,] 10620.10 10839.72 10570.2 [2,] 10841.75 11175.43 10813.6 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(10618.645, 10658.6475, 10730.925, 10798.9375, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1jsaj1272468895.ps tmp/1jsaj1272468895.png",intern=TRUE)) character(0) > try(system("convert tmp/2jsaj1272468895.ps tmp/2jsaj1272468895.png",intern=TRUE)) character(0) > try(system("convert tmp/3jsaj1272468895.ps tmp/3jsaj1272468895.png",intern=TRUE)) character(0) > try(system("convert tmp/4c1r41272468895.ps tmp/4c1r41272468895.png",intern=TRUE)) character(0) > try(system("convert tmp/5c1r41272468895.ps tmp/5c1r41272468895.png",intern=TRUE)) character(0) > try(system("convert tmp/6na871272468895.ps tmp/6na871272468895.png",intern=TRUE)) character(0) > try(system("convert tmp/7na871272468895.ps tmp/7na871272468895.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.500 1.380 2.692