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(300,299,298,296,316,315,300,290,291,291,292,294,302,296,282,282,298,300,289,275,270,269,268,260,271,269,260,262,285,286,272,248,240,234,231,222,233,236,226,232,248,253,233,216,209,202,204,193,201,201,188,198,220,225,215,198,195,183,180,170,175,180,161,174,195,198,188,173,162,149,140,129,132,133,116,128,148,154,152,141,136,119,114,100,108,115,101,116,131,133,135,124,131,113,118,99,107,112,106,121,138,134,132,121,132,113,112,91,96,99,99,110,127,122,124,114,129,113,115,94) > 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,] 300 302 271 233 201 175 132 108 107 96 NA [2,] 299 296 269 236 201 180 133 115 112 99 NA [3,] 298 282 260 226 188 161 116 101 106 99 NA [4,] 296 282 262 232 198 174 128 116 121 110 NA [5,] 316 298 285 248 220 195 148 131 138 127 NA [6,] 315 300 286 253 225 198 154 133 134 122 NA [7,] 300 289 272 233 215 188 152 135 132 124 NA [8,] 290 275 248 216 198 173 141 124 121 114 NA [9,] 291 270 240 209 195 162 136 131 132 129 NA [10,] 291 269 234 202 183 149 119 113 113 113 NA [11,] 292 268 231 204 180 140 114 118 112 115 NA [12,] 294 260 222 193 170 129 100 99 91 94 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -1 -6 -2 3 0 5 1 7 5 3 NA [2,] -1 -14 -9 -10 -13 -19 -17 -14 -6 0 NA [3,] -2 0 2 6 10 13 12 15 15 11 NA [4,] 20 16 23 16 22 21 20 15 17 17 NA [5,] -1 2 1 5 5 3 6 2 -4 -5 NA [6,] -15 -11 -14 -20 -10 -10 -2 2 -2 2 NA [7,] -10 -14 -24 -17 -17 -15 -11 -11 -11 -10 NA [8,] 1 -5 -8 -7 -3 -11 -5 7 11 15 NA [9,] 0 -1 -6 -7 -12 -13 -17 -18 -19 -16 NA [10,] 1 -1 -3 2 -3 -9 -5 5 -1 2 NA [11,] 2 -8 -9 -11 -10 -11 -14 -19 -21 -21 NA [12,] 8 11 11 8 5 3 8 8 5 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/1f3y01277997089.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/2f3y01277997089.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/37ufl1277997089.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/47ufl1277997089.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,] 96 99.0 99.0 110 127.0 122.0 124.0 114.0 129.0 113 112 91.0 [2,] 108 115.0 106.0 121 138.0 134.0 135.0 124.0 132.0 113 115 99.0 [3,] 188 190.5 174.5 186 207.5 211.5 201.5 185.5 178.5 166 160 149.5 [4,] 271 269.0 260.0 262 285.0 286.0 272.0 248.0 240.0 234 231 222.0 [5,] 302 299.0 298.0 296 316.0 315.0 300.0 290.0 291.0 291 292 294.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 106.5587 113.5555 97.55546 115.5508 134.0529 135.5547 133.0493 123.5447 [2,] 269.4413 267.4445 251.44454 256.4492 280.9471 287.4453 269.9507 247.4553 [,9] [,10] [,11] [,12] [1,] 124.5389 105.5436 102.0418 88.0443 [2,] 232.4611 226.4564 217.9582 210.9557 $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, 108, 188, 271, 302, 99, 115, 190.5, 269, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/57ufl1277997089.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,] -6 -19.0 -2.0 15.0 -5 -20 -24.0 -11 -19.0 -9 -21 3 [2,] -1 -14.0 2.0 16.0 -1 -14 -17.0 -7 -17.0 -3 -19 5 [3,] 2 -11.5 10.5 18.5 2 -10 -12.5 -4 -12.5 -1 -11 8 [4,] 5 -6.0 13.0 21.0 5 -2 -11.0 7 -6.0 2 -9 8 [5,] 7 0.0 15.0 23.0 6 2 -10.0 15 0.0 5 2 11 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.9978392 -15.497119 5.003961 16.0018 -0.9978392 -15.995678 -15.49784 [2,] 4.9978392 -7.502881 15.996039 20.9982 4.9978392 -4.004322 -9.50216 [,8] [,9] [,10] [,11] [,12] [1,] -10.994958 -17.996039 -3.498199 -15.996399 6.42 [2,] 2.994958 -7.003961 1.498199 -6.003601 9.58 $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(-6, -1, 2, 5, 7, -19, -14, -11.5, -6, 0, -2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6i4e61277997089.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,] 290.0 260.0 222.0 193.0 170.0 129.0 100.0 99.0 91.0 94.0 NA [2,] 291.5 269.5 237.0 206.5 185.5 155.0 117.5 110.5 109.5 99.0 NA [3,] 297.0 282.0 261.0 229.0 198.0 173.5 132.5 117.0 117.0 113.5 NA [4,] 300.0 297.0 271.5 234.5 208.0 184.0 144.5 131.0 132.0 123.0 NA [5,] 300.0 302.0 286.0 253.0 225.0 198.0 154.0 135.0 138.0 129.0 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 293.1231 269.4571 245.2643 216.229 187.7376 160.2729 120.1851 107.6498 [2,] 300.8769 294.5429 276.7357 241.771 208.2624 186.7271 144.8149 126.3502 [,9] [,10] [,11] [1,] 106.7376 102.5534 NA [2,] 127.2624 124.4466 NA $out [1] 316 315 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(290, 291.5, 297, 300, 300, 260, 269.5, 282, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7i4e61277997089.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,] 165.20 149.50 157.0000 [2,] 181.15 170.25 175.1250 [3,] 190.95 185.75 185.9375 [4,] 199.00 196.00 195.4375 [5,] 212.00 211.50 208.3750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 182.8085 174.0053 176.6728 [2,] 199.0915 197.4947 195.2022 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(165.2, 181.15, 190.95, 199, 212, 149.5, 170.25, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1f3y01277997089.ps tmp/1f3y01277997089.png",intern=TRUE)) character(0) > try(system("convert tmp/2f3y01277997089.ps tmp/2f3y01277997089.png",intern=TRUE)) character(0) > try(system("convert tmp/37ufl1277997089.ps tmp/37ufl1277997089.png",intern=TRUE)) character(0) > try(system("convert tmp/47ufl1277997089.ps tmp/47ufl1277997089.png",intern=TRUE)) character(0) > try(system("convert tmp/57ufl1277997089.ps tmp/57ufl1277997089.png",intern=TRUE)) character(0) > try(system("convert tmp/6i4e61277997089.ps tmp/6i4e61277997089.png",intern=TRUE)) character(0) > try(system("convert tmp/7i4e61277997089.ps tmp/7i4e61277997089.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.221 0.960 1.849