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(100,83,83,83,82,71,82,86,64,66,63,67,41,65,68,90,98,108,92,100,87,91,77,72,59,55,69,71,88,88,97,94,82,75,66,71,83,97,88,89,70) > 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] 41 > (np <- floor(n / par1)) [1] 3 > 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] 4 4 4 4 4 3 3 3 3 3 3 3 > arr [,1] [,2] [,3] [,4] [1,] 100 41 59 83 [2,] 83 65 55 97 [3,] 83 68 69 88 [4,] 83 90 71 89 [5,] 82 98 88 70 [6,] 71 108 88 NA [7,] 82 92 97 NA [8,] 86 100 94 NA [9,] 64 87 82 NA [10,] 66 91 75 NA [11,] 63 77 66 NA [12,] 67 72 71 NA > darr [,1] [,2] [,3] [,4] [1,] -17 24 -4 14 [2,] 0 3 14 -9 [3,] 0 22 2 1 [4,] -1 8 17 -19 [5,] -11 10 0 NA [6,] 11 -16 9 NA [7,] 4 8 -3 NA [8,] -22 -13 -12 NA [9,] 2 4 -7 NA [10,] -3 -14 -9 NA [11,] 4 -5 5 NA [12,] -26 -13 12 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/16k2n1259928316.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/20kkv1259928316.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/3omtj1259928316.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/4jzv51259928316.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,] 41.0 55 68.0 71.0 70 71.0 82.0 86 64.0 66.0 63.0 67.0 [2,] 50.0 60 68.5 77.0 76 79.5 87.0 90 73.0 70.5 64.5 69.0 [3,] 71.0 74 76.0 86.0 85 88.0 92.0 94 82.0 75.0 66.0 71.0 [4,] 91.5 90 85.5 89.5 93 98.0 94.5 97 84.5 83.0 71.5 71.5 [5,] 100.0 97 88.0 90.0 98 108.0 97.0 100 87.0 91.0 77.0 72.0 $n [1] 4 4 4 4 4 3 3 3 3 3 3 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 38.215 50.3 62.57 76.125 71.57 71.12405 85.1584 87.6145 71.50955 [2,] 103.785 97.7 89.43 95.875 98.43 104.87595 98.8416 100.3855 92.49045 [,10] [,11] [,12] [1,] 63.59733 59.61451 68.71947 [2,] 86.40267 72.38549 73.28053 $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(41, 50, 71, 91.5, 100, 55, 60, 74, 90, 97, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5elig1259928316.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,] -17.0 -9.0 0.0 -19.0 -11.0 -16.0 -3.0 -22.0 -7.0 -14.0 -5.0 -26.0 [2,] -10.5 -4.5 0.5 -10.0 -5.5 -3.5 0.5 -17.5 -2.5 -11.5 -0.5 -19.5 [3,] 5.0 1.5 1.5 3.5 0.0 9.0 4.0 -13.0 2.0 -9.0 4.0 -13.0 [4,] 19.0 8.5 12.0 12.5 5.0 10.0 6.0 -12.5 3.0 -6.0 4.5 -0.5 [5,] 24.0 14.0 22.0 17.0 10.0 11.0 8.0 -12.0 4.0 -3.0 5.0 12.0 $n [1] 4 4 4 4 3 3 3 3 3 3 3 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -18.305 -8.77 -7.585 -14.275 -9.578241 -3.314881 -1.017174 -17.561067 [2,] 28.305 11.77 10.585 21.275 9.578241 21.314881 9.017174 -8.438933 [,9] [,10] [,11] [,12] [1,] -3.017174 -14.017174 -0.5610671 -30.332055 [2,] 7.017174 -3.982826 8.5610671 4.332055 $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(-17, -10.5, 5, 19, 24, -9, -4.5, 1.5, 8.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6wa6e1259928316.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] [1,] 63.0 41.0 55.0 83 [2,] 66.5 70.0 67.5 83 [3,] 82.0 88.5 73.0 88 [4,] 83.0 95.0 88.0 89 [5,] 100.0 108.0 97.0 97 $n [1] 12 12 12 5 $conf [,1] [,2] [,3] [,4] [1,] 74.47424 77.09733 63.64981 83.76042 [2,] 89.52576 99.90267 82.35019 92.23958 $out [1] 70 $group [1] 4 $names [1] "1" "2" "3" NA Warning message: In bxp(list(stats = c(63, 66.5, 82, 83, 100, 41, 70, 88.5, 95, 108, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7t38p1259928316.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,] 68.66667 66.0 68.0000 [2,] 72.87500 72.5 72.6875 [3,] 77.50000 79.0 77.7500 [4,] 86.75000 87.0 86.7500 [5,] 93.33333 94.0 93.5000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 71.17152 72.38645 71.336 [2,] 83.82848 85.61355 84.164 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(68.6666666666667, 72.875, 77.5, 86.75, 93.3333333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/16k2n1259928316.ps tmp/16k2n1259928316.png") > system("convert tmp/20kkv1259928316.ps tmp/20kkv1259928316.png") > system("convert tmp/3omtj1259928316.ps tmp/3omtj1259928316.png") > system("convert tmp/4jzv51259928316.ps tmp/4jzv51259928316.png") > system("convert tmp/5elig1259928316.ps tmp/5elig1259928316.png") > system("convert tmp/6wa6e1259928316.ps tmp/6wa6e1259928316.png") > system("convert tmp/7t38p1259928316.ps tmp/7t38p1259928316.png") > > > proc.time() user system elapsed 1.165 0.931 1.513