R version 2.8.0 (2008-10-20) 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. Natural language support but running in an English locale 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(98.6,100.1,98.8,98.3,102.8,103.6,105.2,100.1,98.2,98.4,97.4,98.4,100.3,101.1,104.1,107.3,110.1,112.6,114.3,115.3,109.9,108.2,103.2,101.8,105.6,108.2,109.8,114.6,117.2,116.5,116.1,112.1,106.8,106.9,104.5,103,105.9,107.7,107.1,112.5,114.5,114.6,113.1,112.8,111.9,112,112.4,110,112.3,109.6,111.9,110.8,110.4,110.8,114,108.4,110.5,105.1,102.3,104.3,103.4,102.4,104.5,107.3,110.1,111.8,111.8,105.7,106,106.4,107.1,111.5,109.6,109.9,109.3,111.4,112.9,115.5,118.4,116.2,113.3,113.8,114.1,117.1,115.5,115.2,114.2,115.3,118.8,118,118.1,111.8,112,114.3,115,118.5,117.6,119.1,120.6,123.6,122.7,123.8,123.1,124.5,120.7,118.7,119,122.3,118.6,118.1,118.2,120.8,119.7,119.7,117.1,114.5,116.5,116.4,114.9,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,] 98.6 100.3 105.6 105.9 112.3 103.4 109.6 115.5 117.6 118.6 NA [2,] 100.1 101.1 108.2 107.7 109.6 102.4 109.9 115.2 119.1 118.1 NA [3,] 98.8 104.1 109.8 107.1 111.9 104.5 109.3 114.2 120.6 118.2 NA [4,] 98.3 107.3 114.6 112.5 110.8 107.3 111.4 115.3 123.6 120.8 NA [5,] 102.8 110.1 117.2 114.5 110.4 110.1 112.9 118.8 122.7 119.7 NA [6,] 103.6 112.6 116.5 114.6 110.8 111.8 115.5 118.0 123.8 119.7 NA [7,] 105.2 114.3 116.1 113.1 114.0 111.8 118.4 118.1 123.1 117.1 NA [8,] 100.1 115.3 112.1 112.8 108.4 105.7 116.2 111.8 124.5 114.5 NA [9,] 98.2 109.9 106.8 111.9 110.5 106.0 113.3 112.0 120.7 116.5 NA [10,] 98.4 108.2 106.9 112.0 105.1 106.4 113.8 114.3 118.7 116.4 NA [11,] 97.4 103.2 104.5 112.4 102.3 107.1 114.1 115.0 119.0 114.9 NA [12,] 98.4 101.8 103.0 110.0 104.3 111.5 117.1 118.5 122.3 115.5 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 1.5 0.8 2.6 1.8 -2.7 -1.0 0.3 -0.3 1.5 -0.5 NA [2,] -1.3 3.0 1.6 -0.6 2.3 2.1 -0.6 -1.0 1.5 0.1 NA [3,] -0.5 3.2 4.8 5.4 -1.1 2.8 2.1 1.1 3.0 2.6 NA [4,] 4.5 2.8 2.6 2.0 -0.4 2.8 1.5 3.5 -0.9 -1.1 NA [5,] 0.8 2.5 -0.7 0.1 0.4 1.7 2.6 -0.8 1.1 0.0 NA [6,] 1.6 1.7 -0.4 -1.5 3.2 0.0 2.9 0.1 -0.7 -2.6 NA [7,] -5.1 1.0 -4.0 -0.3 -5.6 -6.1 -2.2 -6.3 1.4 -2.6 NA [8,] -1.9 -5.4 -5.3 -0.9 2.1 0.3 -2.9 0.2 -3.8 2.0 NA [9,] 0.2 -1.7 0.1 0.1 -5.4 0.4 0.5 2.3 -2.0 -0.1 NA [10,] -1.0 -5.0 -2.4 0.4 -2.8 0.7 0.3 0.7 0.3 -1.5 NA [11,] 1.0 -1.4 -1.5 -2.4 2.0 4.4 3.0 3.5 3.3 0.6 NA [12,] 1.9 3.8 2.9 2.3 -0.9 -1.9 -1.6 -0.9 -3.7 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/freestat/rcomp/tmp/12n3h1288093710.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/freestat/rcomp/tmp/22n3h1288093710.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/freestat/rcomp/tmp/32n3h1288093710.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/freestat/rcomp/tmp/4dw3k1288093710.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,] 98.60 100.1 98.80 98.30 102.8 103.60 111.8 100.10 98.2 98.4 97.40 [2,] 103.40 102.4 104.50 107.30 110.1 111.80 113.1 108.40 106.8 106.4 103.20 [3,] 107.75 108.9 109.55 111.95 113.7 115.05 115.2 112.45 111.2 110.1 109.75 [4,] 115.50 115.2 114.20 115.30 118.8 118.00 118.1 115.30 113.3 114.3 114.90 [5,] 118.60 119.1 120.60 123.60 122.7 123.80 123.1 124.50 120.7 118.7 119.00 [,12] [1,] 98.40 [2,] 103.00 [3,] 110.75 [4,] 117.10 [5,] 122.30 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 101.7044 102.5046 104.7035 107.9529 109.3531 111.9522 112.7018 109.0025 [2,] 113.7956 115.2954 114.3965 115.9471 118.0469 118.1478 117.6982 115.8975 [,9] [,10] [,11] [,12] [1,] 107.9523 106.1528 103.9042 103.7051 [2,] 114.4477 114.0472 115.5958 117.7949 $out [1] 105.2 $group [1] 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(98.6, 103.4, 107.75, 115.5, 118.6, 100.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5dw3k1288093710.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,] -2.70 -1.3 -1.1 -1.1 -0.8 -2.60 -6.3 -5.4 -2.0 -5.00 -2.4 -3.7 [2,] -0.50 -0.6 1.1 -0.4 0.0 -0.70 -5.6 -3.8 -1.7 -2.40 -1.4 -1.6 [3,] 0.55 0.8 2.7 2.3 0.6 0.05 -3.3 -1.4 0.1 -0.35 1.5 -0.9 [4,] 1.50 2.1 3.2 2.8 1.7 1.70 -0.3 0.3 0.4 0.40 3.3 2.3 [5,] 2.60 3.0 5.4 4.5 2.6 3.20 1.4 2.1 2.3 0.70 4.4 3.8 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.4492797 -0.5490276 1.650756 0.7011524 -0.2493878 -1.149136 -5.9480913 [2,] 1.5492797 2.1490276 3.749244 3.8988476 1.4493878 1.249136 -0.6519087 [,8] [,9] [,10] [,11] [,12] [1,] -3.4485235 -0.9492437 -1.748992 -0.8483074 -2.954 [2,] 0.6485235 1.1492437 1.048992 3.8483074 1.154 $out [1] -5.4 $group [1] 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-2.70000000000000, -0.5, 0.550000000000004, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/666k51288093710.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] [1,] 97.40 100.30 103.00 105.90 102.30 102.40 109.30 111.80 117.60 114.50 [2,] 98.35 102.50 106.20 108.85 106.75 105.10 110.65 114.25 119.05 115.95 [3,] 98.70 107.75 109.00 112.20 110.45 106.75 113.55 115.25 121.50 117.60 [4,] 101.45 111.35 115.35 112.95 111.35 110.80 115.85 118.05 123.35 119.15 [5,] 105.20 115.30 117.20 114.60 114.00 111.80 118.40 118.80 124.50 120.80 [,11] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 97.28607 103.7135 104.8266 110.3300 108.3519 104.1502 111.1782 113.5168 [2,] 100.11393 111.7865 113.1734 114.0700 112.5481 109.3498 115.9218 116.9832 [,9] [,10] [,11] [1,] 119.5387 116.1405 NA [2,] 123.4613 119.0595 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(97.4, 98.35, 98.7, 101.45, 105.2, 100.3, 102.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/766k51288093710.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,] 108.740 107.750 108.8000 [2,] 109.495 109.650 109.3563 [3,] 110.410 110.975 110.3125 [4,] 113.055 113.075 113.2313 [5,] 115.120 115.200 115.5875 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 108.7863 109.4128 108.5451 [2,] 112.0337 112.5372 112.0799 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(108.74, 109.495, 110.41, 113.055, 115.12, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/12n3h1288093710.ps tmp/12n3h1288093710.png",intern=TRUE)) character(0) > try(system("convert tmp/22n3h1288093710.ps tmp/22n3h1288093710.png",intern=TRUE)) character(0) > try(system("convert tmp/32n3h1288093710.ps tmp/32n3h1288093710.png",intern=TRUE)) character(0) > try(system("convert tmp/4dw3k1288093710.ps tmp/4dw3k1288093710.png",intern=TRUE)) character(0) > try(system("convert tmp/5dw3k1288093710.ps tmp/5dw3k1288093710.png",intern=TRUE)) character(0) > try(system("convert tmp/666k51288093710.ps tmp/666k51288093710.png",intern=TRUE)) character(0) > try(system("convert tmp/766k51288093710.ps tmp/766k51288093710.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.952 1.490 2.163