R version 2.11.1 (2010-05-31) Copyright (C) 2010 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(102.8,106.3,103.7,106.9,104.3,105.4,96.2,95.7,95.9,93.6,94.7,94.5,96.6,96.7,98.9,102,105.2,106.4,99.3,96.4,93.1,95.6,93.3,96.7,105.6,105.2,107,104.9,104.5,105.2,99.7,100.2,98.5,98.4,97.1,98.4,100.6,111.3,119,117.8,108.8,109.3,103.5,103.7,110,105.5,110.4,106.7,110.2,105.2,108,108.1,107.2,106,99.4,100.2,100.3,100.8,99.5,100.2,103,111,120.5,109.5,106.6,105.5,103.9,104.9,104.8,99.6,97,95.4,99.3,103.9,107.4,107.4,111,113.2,108.5,113.3,113.8,105.3,107.5,109.4,118.9,119,115,124.1,120.5,117.7,117.1,118.1,119.6,118.8,124.9,124,124.9,121.7,121.6,125.1,127.9,129,130.1,130.3,127.9,124.1,125.7,129.2,129.2,132.6,131.5,131,125.8,127.2,127.3,127.5,122,118.4,118.3,115.5) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 102.8 96.6 105.6 100.6 110.2 103.0 99.3 118.9 124.9 129.2 NA [2,] 106.3 96.7 105.2 111.3 105.2 111.0 103.9 119.0 121.7 132.6 NA [3,] 103.7 98.9 107.0 119.0 108.0 120.5 107.4 115.0 121.6 131.5 NA [4,] 106.9 102.0 104.9 117.8 108.1 109.5 107.4 124.1 125.1 131.0 NA [5,] 104.3 105.2 104.5 108.8 107.2 106.6 111.0 120.5 127.9 125.8 NA [6,] 105.4 106.4 105.2 109.3 106.0 105.5 113.2 117.7 129.0 127.2 NA [7,] 96.2 99.3 99.7 103.5 99.4 103.9 108.5 117.1 130.1 127.3 NA [8,] 95.7 96.4 100.2 103.7 100.2 104.9 113.3 118.1 130.3 127.5 NA [9,] 95.9 93.1 98.5 110.0 100.3 104.8 113.8 119.6 127.9 122.0 NA [10,] 93.6 95.6 98.4 105.5 100.8 99.6 105.3 118.8 124.1 118.4 NA [11,] 94.7 93.3 97.1 110.4 99.5 97.0 107.5 124.9 125.7 118.3 NA [12,] 94.5 96.7 98.4 106.7 100.2 95.4 109.4 124.0 129.2 115.5 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 3.5 0.1 -0.4 10.7 -5.0 8.0 4.6 0.1 -3.2 3.4 NA [2,] -2.6 2.2 1.8 7.7 2.8 9.5 3.5 -4.0 -0.1 -1.1 NA [3,] 3.2 3.1 -2.1 -1.2 0.1 -11.0 0.0 9.1 3.5 -0.5 NA [4,] -2.6 3.2 -0.4 -9.0 -0.9 -2.9 3.6 -3.6 2.8 -5.2 NA [5,] 1.1 1.2 0.7 0.5 -1.2 -1.1 2.2 -2.8 1.1 1.4 NA [6,] -9.2 -7.1 -5.5 -5.8 -6.6 -1.6 -4.7 -0.6 1.1 0.1 NA [7,] -0.5 -2.9 0.5 0.2 0.8 1.0 4.8 1.0 0.2 0.2 NA [8,] 0.2 -3.3 -1.7 6.3 0.1 -0.1 0.5 1.5 -2.4 -5.5 NA [9,] -2.3 2.5 -0.1 -4.5 0.5 -5.2 -8.5 -0.8 -3.8 -3.6 NA [10,] 1.1 -2.3 -1.3 4.9 -1.3 -2.6 2.2 6.1 1.6 -0.1 NA [11,] -0.2 3.4 1.3 -3.7 0.7 -1.6 1.9 -0.9 3.5 -2.8 NA [12,] 2.1 8.9 2.2 3.5 2.8 3.9 9.5 0.9 0.0 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/1d4ak1290259459.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/2d4ak1290259459.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/36w951290259459.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/46w951290259459.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] [1,] 96.6 96.70 98.9 102.0 104.3 105.20 96.2 95.7 93.1 93.60 93.3 [2,] 100.6 105.20 107.0 106.9 105.2 105.50 99.4 100.2 98.5 98.40 97.0 [3,] 104.3 108.65 111.5 108.8 108.0 107.85 103.7 104.3 107.4 103.05 103.5 [4,] 118.9 119.00 120.5 124.1 120.5 117.70 117.1 118.1 119.6 118.40 118.3 [5,] 129.2 132.60 131.5 131.0 127.9 129.00 130.1 130.3 127.9 124.10 125.7 [,12] [1,] 94.50 [2,] 96.70 [3,] 103.45 [4,] 115.50 [5,] 129.20 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 95.15659 101.7550 104.7549 100.2062 100.3555 101.7544 94.85637 95.35645 [2,] 113.44341 115.5450 118.2451 117.3938 115.6445 113.9456 112.54363 113.24355 [,9] [,10] [,11] [,12] [1,] 96.8576 93.0572 92.85767 94.05677 [2,] 117.9424 113.0428 114.14233 112.84323 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(96.6, 100.6, 104.3, 118.9, 129.2, 96.7, 105.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5h5r81290259459.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] [1,] -5.00 -4.0 -2.10 -9.00 -2.8 -9.2 -0.50 -5.500000e+00 -8.50 -2.6 -3.70 [2,] -0.40 -1.1 -1.20 -3.60 -1.1 -6.6 0.20 -2.400000e+00 -4.50 -1.3 -1.60 [3,] 1.75 2.0 0.05 -1.75 0.9 -5.1 0.35 -7.105427e-15 -2.95 0.5 0.25 [4,] 4.60 3.5 3.20 2.80 1.2 -0.6 1.00 5.000000e-01 -0.10 2.2 1.90 [5,] 10.70 9.5 9.10 3.60 2.2 1.1 1.00 1.500000e+00 2.50 6.1 3.50 [,12] [1,] 0.0 [2,] 2.1 [3,] 2.8 [4,] 3.9 [5,] 3.9 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.7481994 -0.2983434 -2.148415 -4.947695 -0.2491717 -8.097839 -0.0497119 [2,] 4.2481994 4.2983434 2.248415 1.447695 2.0491717 -2.102161 0.7497119 [,8] [,9] [,10] [,11] [,12] [1,] -1.448956 -5.1484154 -1.248740 -1.498740 1.852 [2,] 1.448956 -0.7515846 2.248740 1.998740 3.748 $out [1] -11.0 -2.9 4.8 6.3 8.9 9.5 $group [1] 3 7 7 8 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-5, -0.399999999999991, 1.75000000000001, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6h5r81290259459.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] [,10] [,11] [1,] 93.60 93.10 97.10 100.60 99.4 95.40 99.30 115.00 121.6 115.50 NA [2,] 95.20 96.00 98.45 104.60 100.2 101.30 106.35 117.90 124.5 120.20 NA [3,] 99.50 96.70 102.35 109.05 103.0 104.85 108.00 118.95 126.8 127.25 NA [4,] 104.85 100.65 105.20 110.85 107.6 108.05 112.10 122.25 129.1 130.10 NA [5,] 106.90 106.40 107.00 119.00 110.2 111.00 113.80 124.90 130.3 132.60 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 95.09857 94.5791 99.27128 106.1993 99.62481 101.7713 105.3774 116.9659 [2,] 103.90143 98.8209 105.42872 111.9007 106.37519 107.9287 110.6226 120.9341 [,9] [,10] [,11] [1,] 124.7019 122.7345 NA [2,] 128.8981 131.7655 NA $out [1] 120.5 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(93.6, 95.2, 99.5, 104.85, 106.9, 93.1, 96, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/7h5r81290259459.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,] 106.010 103.050 105.5500 [2,] 107.750 103.600 107.0750 [3,] 109.070 105.850 108.7438 [4,] 112.335 108.325 111.4875 [5,] 113.680 111.500 114.7750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 106.9788 103.6949 106.7312 [2,] 111.1612 108.0051 110.7563 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(106.01, 107.75, 109.07, 112.335, 113.68, 103.05, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1d4ak1290259459.ps tmp/1d4ak1290259459.png",intern=TRUE)) character(0) > try(system("convert tmp/2d4ak1290259459.ps tmp/2d4ak1290259459.png",intern=TRUE)) character(0) > try(system("convert tmp/36w951290259459.ps tmp/36w951290259459.png",intern=TRUE)) character(0) > try(system("convert tmp/46w951290259459.ps tmp/46w951290259459.png",intern=TRUE)) character(0) > try(system("convert tmp/5h5r81290259459.ps tmp/5h5r81290259459.png",intern=TRUE)) character(0) > try(system("convert tmp/6h5r81290259459.ps tmp/6h5r81290259459.png",intern=TRUE)) character(0) > try(system("convert tmp/7h5r81290259459.ps tmp/7h5r81290259459.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.980 1.340 3.317