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(333,332,331,329,349,348,333,323,324,324,325,327,329,333,329,333,355,358,338,326,320,322,322,324,326,330,331,333,364,363,341,327,313,321,312,312,312,314,312,319,356,351,329,313,298,303,278,275,276,276,273,287,320,313,281,266,258,259,237,231,237,236,229,243,271,262,227,208,212,222,200,193,204,203,190,209,240,234,210,195,202,204,180,169,178,181,163,174,194,187,160,143,151,154,141,127,134,138,120,129,151,152,124,99,104,109,96,87,94,89,63,76,100,104,80,55,60,71,62,61) > 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,] 333 329 326 312 276 237 204 178 134 94 NA [2,] 332 333 330 314 276 236 203 181 138 89 NA [3,] 331 329 331 312 273 229 190 163 120 63 NA [4,] 329 333 333 319 287 243 209 174 129 76 NA [5,] 349 355 364 356 320 271 240 194 151 100 NA [6,] 348 358 363 351 313 262 234 187 152 104 NA [7,] 333 338 341 329 281 227 210 160 124 80 NA [8,] 323 326 327 313 266 208 195 143 99 55 NA [9,] 324 320 313 298 258 212 202 151 104 60 NA [10,] 324 322 321 303 259 222 204 154 109 71 NA [11,] 325 322 312 278 237 200 180 141 96 62 NA [12,] 327 324 312 275 231 193 169 127 87 61 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -1 4 4 2 0 -1 -1 3 4 -5 NA [2,] -1 -4 1 -2 -3 -7 -13 -18 -18 -26 NA [3,] -2 4 2 7 14 14 19 11 9 13 NA [4,] 20 22 31 37 33 28 31 20 22 24 NA [5,] -1 3 -1 -5 -7 -9 -6 -7 1 4 NA [6,] -15 -20 -22 -22 -32 -35 -24 -27 -28 -24 NA [7,] -10 -12 -14 -16 -15 -19 -15 -17 -25 -25 NA [8,] 1 -6 -14 -15 -8 4 7 8 5 5 NA [9,] 0 2 8 5 1 10 2 3 5 11 NA [10,] 1 0 -9 -25 -22 -22 -24 -13 -13 -9 NA [11,] 2 2 0 -3 -6 -7 -11 -14 -9 -1 NA [12,] 2 2 0 1 6 11 9 7 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/rcomp/tmp/1trui1281880020.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/2trui1281880020.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/340tl1281880020.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/440tl1281880020.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,] 94.0 89 63 76 100.0 104.0 80 55 60 71.0 62.0 61 [2,] 178.0 181 163 174 194.0 187.0 160 143 151 154.0 141.0 127 [3,] 256.5 256 251 265 295.5 287.5 254 237 235 240.5 218.5 212 [4,] 326.0 330 329 329 355.0 351.0 333 323 313 321.0 312.0 312 [5,] 333.0 333 331 333 364.0 363.0 341 327 324 324.0 325.0 327 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 182.5533 181.5537 168.0598 187.5558 215.058 205.5591 167.5623 147.0648 [2,] 330.4467 330.4463 333.9402 342.4442 375.942 369.4409 340.4377 326.9352 [,9] [,10] [,11] [,12] [1,] 154.0583 157.0601 133.0616 119.5666 [2,] 315.9417 323.9399 303.9384 304.4334 $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(94, 178, 256.5, 326, 333, 89, 181, 256, 330, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5e9a61281880020.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,] -5 -26.0 -2 20 -9 -35 -25.0 -15.0 0 -25 -14.0 0 [2,] -1 -18.0 4 22 -7 -28 -19.0 -8.0 2 -22 -9.0 2 [3,] 1 -5.5 10 26 -3 -24 -15.5 2.5 4 -13 -4.5 6 [4,] 4 -2.0 14 31 1 -22 -14.0 5.0 8 -9 0.0 7 [5,] 4 1.0 19 37 4 -15 -10.0 8.0 11 1 2.0 11 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -1.498199 -13.494238 5.003601 21.50324 -6.997119 -26.99784 -17.9982 [2,] 3.498199 2.494238 14.996399 30.49676 0.997119 -21.00216 -13.0018 [,8] [,9] [,10] [,11] [,12] [1,] -3.995318 1.002161 -19.495318 -8.996758833 3.366667 [2,] 8.995318 6.997839 -6.504682 -0.003241167 8.633333 $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(-5, -1, 1, 4, 4, -26, -18, -5.5, -2, 1, -2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6e9a61281880020.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,] 323.0 320.0 312.0 275.0 231.0 193 169.0 127.0 87.0 55.0 NA [2,] 324.5 323.0 317.0 300.5 258.5 210 192.5 147.0 101.5 61.5 NA [3,] 330.0 329.0 328.5 312.5 274.5 228 203.5 161.5 122.0 73.5 NA [4,] 333.0 335.5 337.0 324.0 284.0 240 209.5 179.5 136.0 91.5 NA [5,] 333.0 338.0 364.0 356.0 320.0 271 234.0 194.0 152.0 104.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,] 326.1231 323.2987 319.3779 301.7815 262.8693 214.3168 195.7462 146.6765 [2,] 333.8769 334.7013 337.6221 323.2185 286.1307 241.6832 211.2538 176.3235 [,9] [,10] [,11] [1,] 106.2643 59.8168 NA [2,] 137.7357 87.1832 NA $out [1] 349 348 355 358 240 $group [1] 1 1 2 2 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(323, 324.5, 330, 333, 333, 320, 323, 329, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7p0rr1281880020.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,] 210.60 212.00 220.1250 [2,] 224.85 236.00 237.3750 [3,] 238.20 252.50 249.7500 [4,] 243.20 260.75 255.4375 [5,] 270.00 295.50 279.5000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 229.8304 241.2114 241.5116 [2,] 246.5696 263.7886 257.9884 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(210.6, 224.85, 238.2, 243.2, 270, 212, 236, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1trui1281880020.ps tmp/1trui1281880020.png",intern=TRUE)) character(0) > try(system("convert tmp/2trui1281880020.ps tmp/2trui1281880020.png",intern=TRUE)) character(0) > try(system("convert tmp/340tl1281880020.ps tmp/340tl1281880020.png",intern=TRUE)) character(0) > try(system("convert tmp/440tl1281880020.ps tmp/440tl1281880020.png",intern=TRUE)) character(0) > try(system("convert tmp/5e9a61281880020.ps tmp/5e9a61281880020.png",intern=TRUE)) character(0) > try(system("convert tmp/6e9a61281880020.ps tmp/6e9a61281880020.png",intern=TRUE)) character(0) > try(system("convert tmp/7p0rr1281880020.ps tmp/7p0rr1281880020.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.177 0.910 1.579