R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(2253,2218,1855,2187,1852,1570,1851,1954,1828,2251,2277,2085,2282,2266,1878,2267,2069,1746,2299,2360,2214,2825,2355,2333,3016,2155,2172,2150,2533,2058,2160,2260,2498,2695,2799,2946,2930,2318,2540,2570,2669,2450,2842,3440,2678,2981,2260,2844,2546,2456,2295,2379,2479,2057,2280,2351,2276,2548,2311,2201,2725) > 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] 61 > (np <- floor(n / par1)) [1] 5 > 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] 6 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2253 2282 3016 2930 2546 2725 [2,] 2218 2266 2155 2318 2456 NA [3,] 1855 1878 2172 2540 2295 NA [4,] 2187 2267 2150 2570 2379 NA [5,] 1852 2069 2533 2669 2479 NA [6,] 1570 1746 2058 2450 2057 NA [7,] 1851 2299 2160 2842 2280 NA [8,] 1954 2360 2260 3440 2351 NA [9,] 1828 2214 2498 2678 2276 NA [10,] 2251 2825 2695 2981 2548 NA [11,] 2277 2355 2799 2260 2311 NA [12,] 2085 2333 2946 2844 2201 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -35 -16 -861 -612 -90 NA [2,] -363 -388 17 222 -161 NA [3,] 332 389 -22 30 84 NA [4,] -335 -198 383 99 100 NA [5,] -282 -323 -475 -219 -422 NA [6,] 281 553 102 392 223 NA [7,] 103 61 100 598 71 NA [8,] -126 -146 238 -762 -75 NA [9,] 423 611 197 303 272 NA [10,] 26 -470 104 -721 -237 NA [11,] -192 -22 147 584 -110 NA [12,] 197 683 -16 -298 524 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/freestat/rcomp/tmp/15k4m1257962134.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/freestat/rcomp/tmp/2xzkm1257962134.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/freestat/rcomp/tmp/30bu11257962134.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/freestat/rcomp/tmp/4gxg61257962134.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,] 2253.0 2155 1855 2150 1852 1570 2160 2260 1828 2251 2260 2085 [2,] 2282.0 2218 1878 2187 2069 1746 2160 2260 2214 2548 2277 2201 [3,] 2635.5 2266 2172 2267 2479 2057 2280 2351 2276 2695 2311 2333 [4,] 2930.0 2318 2295 2379 2533 2058 2299 2360 2498 2825 2355 2844 [5,] 3016.0 2456 2540 2570 2669 2450 2299 2360 2678 2981 2355 2946 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2217.519 2195.340 1877.349 2131.333 2151.139 1836.542 2181.783 2280.340 [2,] 3053.481 2336.660 2466.651 2402.667 2806.861 2277.458 2378.217 2421.660 [,9] [,10] [,11] [,12] [1,] 2075.326 2499.272 2255.885 1878.658 [2,] 2476.674 2890.728 2366.115 2787.342 $out [1] 1851 2842 1954 3440 2799 $group [1] 7 7 8 8 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(2253, 2282, 2635.5, 2930, 3016, 2155, 2218, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5occh1257962134.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,] -861 -388 -22 -335 -475 102 61 -146 197 -721 -192 -298 [2,] -612 -363 30 -198 -422 223 71 -146 272 -470 -110 -16 [3,] -90 -161 84 99 -323 281 100 -126 303 -237 -22 197 [4,] -35 17 332 100 -282 392 103 -75 423 26 147 524 [5,] -16 222 389 383 -219 553 103 -75 611 104 147 683 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -497.7067 -429.5070 -129.3924 -111.5660 -421.9236 161.5850 77.38888 [2,] 317.7067 107.5070 297.3924 309.5660 -224.0764 400.4150 122.61112 [,8] [,9] [,10] [,11] [,12] [1,] -176.16842 196.3038 -587.4724 -203.5956 -184.5626 [2,] -75.83158 409.6962 113.4724 159.5956 578.5626 $out [1] 598 238 -762 584 $group [1] 7 8 8 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-861, -612, -90, -35, -16, -388, -363, -161, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6xp981257962134.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] [1,] 1570.0 1878.0 2058.0 2260.0 2057.0 2725 [2,] 1851.5 2141.5 2157.5 2495.0 2278.0 2725 [3,] 2019.5 2274.5 2379.0 2673.5 2331.0 2725 [4,] 2234.5 2344.0 2747.0 2887.0 2467.5 2725 [5,] 2277.0 2360.0 3016.0 3440.0 2548.0 2725 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1844.811 2182.138 2110.125 2494.706 2244.568 2725 [2,] 2194.189 2366.862 2647.875 2852.294 2417.432 2725 $out [1] 1746 2825 $group [1] 2 2 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(1570, 1851.5, 2019.5, 2234.5, 2277, 1878, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7ae7h1257962134.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,] 2148.0 2057.0 2086.50 [2,] 2284.5 2266.5 2248.75 [3,] 2315.5 2295.5 2305.50 [4,] 2477.4 2415.0 2439.25 [5,] 2660.0 2635.5 2686.50 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 2227.517 2227.768 2218.612 [2,] 2403.483 2363.232 2392.388 $out [1] 1976.2 2695.0 1902.0 $group [1] 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(2148, 2284.5, 2315.5, 2477.4, 2660, 2057, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > system("convert tmp/15k4m1257962134.ps tmp/15k4m1257962134.png") > system("convert tmp/2xzkm1257962134.ps tmp/2xzkm1257962134.png") > system("convert tmp/30bu11257962134.ps tmp/30bu11257962134.png") > system("convert tmp/4gxg61257962134.ps tmp/4gxg61257962134.png") > system("convert tmp/5occh1257962134.ps tmp/5occh1257962134.png") > system("convert tmp/6xp981257962134.ps tmp/6xp981257962134.png") > system("convert tmp/7ae7h1257962134.ps tmp/7ae7h1257962134.png") > > > proc.time() user system elapsed 1.908 1.510 2.210