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(75.9,76.9,77.9,78.9,79.9,80.9,81.9,82.9,83.9,84.9,85.9,86.9,87.9,88.9,89.9,90.9,91.9,92.9,93.9,94.9,95.9,96.9,97.9,98.9,99.9,100.9,101.9,102.9,103.9,104.9,105.9,106.9,107.9,108.9,109.9,110.9,111.9,112.9,113.9,114.9,115.9,116.9,117.9,118.9,119.9,120.9,121.9,122.9,123.9,124.9,125.9,126.9,127.9,128.9,129.9,130.9,131.9,132.9,133.9,134.9,135.9,136.9,137.9,138.9,139.9,140.9,141.9,142.9,143.9,144.9,145.9,146.9,147.9,148.9,149.9,150.9,151.9,152.9,153.9,154.9,155.9,156.9,157.9,158.9,159.9,160.9,161.9,162.9,163.9,164.9,165.9,166.9,167.9,168.9,169.9,170.9,171.9,172.9,173.9,174.9,175.9,176.9,177.9,178.9,179.9,180.9,181.9,182.9) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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] 9 9 9 9 9 9 9 9 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 75.9 87.9 99.9 111.9 123.9 135.9 147.9 159.9 171.9 NA [2,] 76.9 88.9 100.9 112.9 124.9 136.9 148.9 160.9 172.9 NA [3,] 77.9 89.9 101.9 113.9 125.9 137.9 149.9 161.9 173.9 NA [4,] 78.9 90.9 102.9 114.9 126.9 138.9 150.9 162.9 174.9 NA [5,] 79.9 91.9 103.9 115.9 127.9 139.9 151.9 163.9 175.9 NA [6,] 80.9 92.9 104.9 116.9 128.9 140.9 152.9 164.9 176.9 NA [7,] 81.9 93.9 105.9 117.9 129.9 141.9 153.9 165.9 177.9 NA [8,] 82.9 94.9 106.9 118.9 130.9 142.9 154.9 166.9 178.9 NA [9,] 83.9 95.9 107.9 119.9 131.9 143.9 155.9 167.9 179.9 NA [10,] 84.9 96.9 108.9 120.9 132.9 144.9 156.9 168.9 180.9 NA [11,] 85.9 97.9 109.9 121.9 133.9 145.9 157.9 169.9 181.9 NA [12,] 86.9 98.9 110.9 122.9 134.9 146.9 158.9 170.9 182.9 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 1 1 1 1 1 1 1 1 NA [2,] 1 1 1 1 1 1 1 1 1 NA [3,] 1 1 1 1 1 1 1 1 1 NA [4,] 1 1 1 1 1 1 1 1 1 NA [5,] 1 1 1 1 1 1 1 1 1 NA [6,] 1 1 1 1 1 1 1 1 1 NA [7,] 1 1 1 1 1 1 1 1 1 NA [8,] 1 1 1 1 1 1 1 1 1 NA [9,] 1 1 1 1 1 1 1 1 1 NA [10,] 1 1 1 1 1 1 1 1 1 NA [11,] 1 1 1 1 1 1 1 1 1 NA [12,] 1 1 1 1 1 1 1 1 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/1gt561289830501.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/2gt561289830501.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/3834q1289830501.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/4834q1289830501.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,] 75.9 76.9 77.9 78.9 79.9 80.9 81.9 82.9 83.9 84.9 85.9 86.9 [2,] 99.9 100.9 101.9 102.9 103.9 104.9 105.9 106.9 107.9 108.9 109.9 110.9 [3,] 123.9 124.9 125.9 126.9 127.9 128.9 129.9 130.9 131.9 132.9 133.9 134.9 [4,] 147.9 148.9 149.9 150.9 151.9 152.9 153.9 154.9 155.9 156.9 157.9 158.9 [5,] 171.9 172.9 173.9 174.9 175.9 176.9 177.9 178.9 179.9 180.9 181.9 182.9 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 98.62 99.62 100.62 101.62 102.62 103.62 104.62 105.62 106.62 107.62 [2,] 149.18 150.18 151.18 152.18 153.18 154.18 155.18 156.18 157.18 158.18 [,11] [,12] [1,] 108.62 109.62 [2,] 159.18 160.18 $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(75.9, 99.9, 123.9, 147.9, 171.9, 76.9, 100.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/51ulb1289830501.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,] 1 1 1 1 1 1 1 1 1 1 1 1 [2,] 1 1 1 1 1 1 1 1 1 1 1 1 [3,] 1 1 1 1 1 1 1 1 1 1 1 1 [4,] 1 1 1 1 1 1 1 1 1 1 1 1 [5,] 1 1 1 1 1 1 1 1 1 1 1 1 $n [1] 9 9 9 9 9 9 9 9 9 9 9 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 1 1 1 1 1 1 1 1 1 1 1 1 [2,] 1 1 1 1 1 1 1 1 1 1 1 1 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/61ulb1289830501.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,] 75.9 87.9 99.9 111.9 123.9 135.9 147.9 159.9 171.9 NA [2,] 78.4 90.4 102.4 114.4 126.4 138.4 150.4 162.4 174.4 NA [3,] 81.4 93.4 105.4 117.4 129.4 141.4 153.4 165.4 177.4 NA [4,] 84.4 96.4 108.4 120.4 132.4 144.4 156.4 168.4 180.4 NA [5,] 86.9 98.9 110.9 122.9 134.9 146.9 158.9 170.9 182.9 NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 78.66336 90.66336 102.6634 114.6634 126.6634 138.6634 150.6634 162.6634 [2,] 84.13664 96.13664 108.1366 120.1366 132.1366 144.1366 156.1366 168.1366 [,9] [,10] [1,] 174.6634 NA [2,] 180.1366 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7c3kw1289830501.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,] 123.9 123.9 123.9 [2,] 126.4 126.4 126.4 [3,] 129.4 129.4 129.4 [4,] 132.4 132.4 132.4 [5,] 134.9 134.9 134.9 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 126.6634 126.6634 126.6634 [2,] 132.1366 132.1366 132.1366 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > try(system("convert tmp/1gt561289830501.ps tmp/1gt561289830501.png",intern=TRUE)) character(0) > try(system("convert tmp/2gt561289830501.ps tmp/2gt561289830501.png",intern=TRUE)) character(0) > try(system("convert tmp/3834q1289830501.ps tmp/3834q1289830501.png",intern=TRUE)) character(0) > try(system("convert tmp/4834q1289830501.ps tmp/4834q1289830501.png",intern=TRUE)) character(0) > try(system("convert tmp/51ulb1289830501.ps tmp/51ulb1289830501.png",intern=TRUE)) character(0) > try(system("convert tmp/61ulb1289830501.ps tmp/61ulb1289830501.png",intern=TRUE)) character(0) > try(system("convert tmp/7c3kw1289830501.ps tmp/7c3kw1289830501.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.269 0.968 1.987