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(90,80,100,96,100,91,81,80,100,94,100,80,100,90,100,100,100,90,97,90,86,100,100,82,90,94,100,95,100,88,80,81,100,100,100,100,95,100,90,90,100,85,98,91,90,70,100,83,100,100,100,100,100,100,86,100,100,100,100,100,76,100,100,100,100,80,100,100,100,89,100,90,90,95,95,99,90,90,100,100,90,100,81,100,100,98,96,90,90,100,100,88,73,85,100,100,99,90,100,100,100,91,96,80,100,85,90,100,94,95,96,80,100,82,90,100,90,100,100,94,90,79,95,100,91,100,100,76,87,95,71,100,100,100,92,93,80,100,80,90,100,100,100,99,85,100,100,85,100,100) > 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] 150 > (np <- floor(n / par1)) [1] 12 > 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] 13 13 13 13 13 13 12 12 12 12 12 12 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 90 100 90 95 100 76 90 100 99 94 90 100 85 [2,] 80 90 94 100 100 100 95 98 90 95 79 100 100 [3,] 100 100 100 90 100 100 95 96 100 96 95 92 100 [4,] 96 100 95 90 100 100 99 90 100 80 100 93 85 [5,] 100 100 100 100 100 100 90 90 100 100 91 80 100 [6,] 91 90 88 85 100 80 90 100 91 82 100 100 100 [7,] 81 97 80 98 86 100 100 100 96 90 100 80 NA [8,] 80 90 81 91 100 100 100 88 80 100 76 90 NA [9,] 100 86 100 90 100 100 90 73 100 90 87 100 NA [10,] 94 100 100 70 100 89 100 85 85 100 95 100 NA [11,] 100 100 100 100 100 100 81 100 90 100 71 100 NA [12,] 80 82 100 83 100 90 100 100 100 94 100 99 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] -10 -10 4 5 0 24 5 -2 -9 1 -11 0 15 [2,] 20 10 6 -10 0 0 0 -2 10 1 16 -8 0 [3,] -4 0 -5 0 0 0 4 -6 0 -16 5 1 -15 [4,] 4 0 5 10 0 0 -9 0 0 20 -9 -13 15 [5,] -9 -10 -12 -15 0 -20 0 10 -9 -18 9 20 0 [6,] -10 7 -8 13 -14 20 10 0 5 8 0 -20 NA [7,] -1 -7 1 -7 14 0 0 -12 -16 10 -24 10 NA [8,] 20 -4 19 -1 0 0 -10 -15 20 -10 11 10 NA [9,] -6 14 0 -20 0 -11 10 12 -15 10 8 0 NA [10,] 6 0 0 30 0 11 -19 15 5 0 -24 0 NA [11,] -20 -18 0 -17 0 -10 19 0 10 -6 29 -1 NA [12,] 20 8 -5 17 -24 0 0 -1 -6 -4 0 -14 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/13ylo1289579228.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/23ylo1289579228.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/33ylo1289579228.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/4e7391289579228.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,] 76 79 90 80 80 80 80.0 76.0 73.0 70.0 90 80.0 [2,] 90 90 95 90 91 88 83.5 80.5 88.5 87.0 95 86.5 [3,] 94 95 100 96 100 91 96.5 90.0 95.0 97.5 100 99.5 [4,] 100 100 100 100 100 100 100.0 100.0 100.0 100.0 100 100.0 [5,] 100 100 100 100 100 100 100.0 100.0 100.0 100.0 100 100.0 $n [1] 13 13 13 13 13 13 12 12 12 12 12 12 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 89.61787 90.61787 97.80893 91.61787 96.05608 85.74144 88.97424 [2,] 98.38213 99.38213 102.19107 100.38213 103.94392 96.25856 104.02576 [,8] [,9] [,10] [,11] [,12] [1,] 81.10592 89.75477 91.57061 97.71947 93.34256 [2,] 98.89408 100.24523 103.42939 102.28053 105.65744 $out [1] 81 71 $group [1] 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(76, 90, 94, 100, 100, 79, 90, 95, 100, 100, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5e7391289579228.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,] -11 -10 -6 0 -20 -20.0 -24.0 -15 -20.0 0.0 -20.0 -14.0 [2,] -9 0 -5 0 -12 -9.0 -9.5 -7 -8.5 0.0 -13.5 -5.5 [3,] 0 0 0 0 -9 2.5 -0.5 0 0.0 0.0 -0.5 -0.5 [4,] 5 10 0 5 0 9.0 5.5 15 10.0 8.5 5.0 4.0 [5,] 24 20 5 10 10 20.0 14.0 20 14.0 15.0 29.0 17.0 $n [1] 13 13 13 13 13 12 12 12 12 12 12 12 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -6.134984 -4.382132 -2.191066 -2.191066 -14.258558 -5.709921 -7.341601 [2,] 6.134984 4.382132 2.191066 2.191066 -3.741442 10.709921 6.341601 [,8] [,9] [,10] [,11] [,12] [1,] -10.03435 -8.437974 -3.876907 -8.937974 -4.833014 [2,] 10.03435 8.437974 3.876907 7.937974 3.833014 $out [1] -16 -15 -9 20 -9 -13 15 20 30 -19 -24 20 -24 $group [1] 3 3 4 4 4 4 4 5 10 10 10 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-11, -9, 0, 5, 24, -10, 0, 0, 10, 20, -6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/66y2u1289579228.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] [,12] [,13] [1,] 80.0 82.0 80.0 83.0 100 76.0 81 73 80.0 80.0 71 80.0 85 [2,] 80.5 90.0 89.0 87.5 100 89.5 90 89 90.0 90.0 83 91.0 85 [3,] 92.5 98.5 97.5 90.5 100 100.0 95 97 97.5 94.5 93 99.5 100 [4,] 100.0 100.0 100.0 99.0 100 100.0 100 100 100.0 100.0 100 100.0 100 [5,] 100.0 100.0 100.0 100.0 100 100.0 100 100 100.0 100.0 100 100.0 100 $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 83.60592 93.93893 92.48283 85.25477 100 95.21088 90.43893 91.98283 [2,] 101.39408 103.06107 102.51717 95.74523 100 104.78912 99.56107 102.01717 [,9] [,10] [,11] [,12] [,13] [1,] 92.93893 89.93893 85.24619 95.39504 90.32452 [2,] 102.06107 99.06107 100.75381 103.60496 109.67548 $out [1] 70 86 $group [1] 4 5 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" NA Warning message: In bxp(list(stats = c(80, 80.5, 92.5, 100, 100, 82, 90, 98.5, 100, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/76y2u1289579228.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,] 89.66667 90.00 92.3750 [2,] 92.66667 94.50 94.0000 [3,] 93.54487 96.25 94.8125 [4,] 94.81410 99.75 95.2500 [5,] 97.23077 100.00 95.5000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 92.56541 93.85544 94.24237 [2,] 94.52433 98.64456 95.38263 $out [1] 97.500 90.375 98.750 $group [1] 3 3 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(89.6666666666667, 92.6666666666667, 93.5448717948718, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > try(system("convert tmp/13ylo1289579228.ps tmp/13ylo1289579228.png",intern=TRUE)) character(0) > try(system("convert tmp/23ylo1289579228.ps tmp/23ylo1289579228.png",intern=TRUE)) character(0) > try(system("convert tmp/33ylo1289579228.ps tmp/33ylo1289579228.png",intern=TRUE)) character(0) > try(system("convert tmp/4e7391289579228.ps tmp/4e7391289579228.png",intern=TRUE)) character(0) > try(system("convert tmp/5e7391289579228.ps tmp/5e7391289579228.png",intern=TRUE)) character(0) > try(system("convert tmp/66y2u1289579228.ps tmp/66y2u1289579228.png",intern=TRUE)) character(0) > try(system("convert tmp/76y2u1289579228.ps tmp/76y2u1289579228.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.247 0.970 1.573