R version 2.7.2 (2008-08-25) 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(2490,3266,3475,3127,2955,3870,2852,3142,3029,3180,2560,2733,2452,2553,2777,2520,2318,2873,2311,2395,2099,2268,2316,2181,2175,2627,2578,3090,2634,3225,2938,3174,3350,2588,2061,2691,2061,2918,2223,2651,2379,3146,2883,2768,3258,2839,2470,5072,1463,1600,2203,2013,2169,2640,2411,2528,2292,1988,1774,2279) > 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] 60 > (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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2490 2452 2175 2061 1463 NA [2,] 3266 2553 2627 2918 1600 NA [3,] 3475 2777 2578 2223 2203 NA [4,] 3127 2520 3090 2651 2013 NA [5,] 2955 2318 2634 2379 2169 NA [6,] 3870 2873 3225 3146 2640 NA [7,] 2852 2311 2938 2883 2411 NA [8,] 3142 2395 3174 2768 2528 NA [9,] 3029 2099 3350 3258 2292 NA [10,] 3180 2268 2588 2839 1988 NA [11,] 2560 2316 2061 2470 1774 NA [12,] 2733 2181 2691 5072 2279 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 776 101 452 857 137 NA [2,] 209 224 -49 -695 603 NA [3,] -348 -257 512 428 -190 NA [4,] -172 -202 -456 -272 156 NA [5,] 915 555 591 767 471 NA [6,] -1018 -562 -287 -263 -229 NA [7,] 290 84 236 -115 117 NA [8,] -113 -296 176 490 -236 NA [9,] 151 169 -762 -419 -304 NA [10,] -620 48 -527 -369 -214 NA [11,] 173 -135 630 2602 505 NA [12,] -281 -6 -630 -3609 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/freestat/rcomp/tmp/1kpok1225703440.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/2n21z1225703440.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/3uwi71225703440.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/4s7z61225703440.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,] 2061 2553 2203 2013 2169 2640 2311 2395 2099 1988 1774 2181 [2,] 2061 2553 2223 2520 2318 2873 2411 2528 2292 2268 2061 2279 [3,] 2175 2627 2578 2651 2379 3146 2852 2768 3029 2588 2316 2691 [4,] 2452 2918 2777 3090 2634 3225 2883 3142 3258 2839 2470 2733 [5,] 2490 3266 3475 3127 2955 3225 2938 3174 3350 3180 2560 2733 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1898.720 2369.092 2186.545 2248.239 2155.715 2897.278 2518.486 2334.149 [2,] 2451.280 2884.908 2969.455 3053.761 2602.285 3394.722 3185.514 3201.851 [,9] [,10] [,11] [,12] [1,] 2346.427 2184.533 2027.002 2370.205 [2,] 3711.573 2991.467 2604.998 3011.795 $out [1] 1463 1600 3870 5072 $group [1] 1 2 6 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(2061, 2061, 2175, 2452, 2490, 2553, 2553, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5rj7o1225703440.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,] 101 -49 -348 -272 471 -562 -115 -296 -762 -620 -135 -3609.0 [2,] 137 -49 -257 -272 555 -562 84 -236 -419 -527 173 -2119.5 [3,] 452 209 -190 -202 591 -287 117 -113 -304 -369 505 -455.5 [4,] 776 224 428 -172 767 -263 236 176 151 -214 630 -143.5 [5,] 857 603 512 -172 915 -229 290 490 169 48 630 -6.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.4842097 16.09889 -674.0193 -272.6597 441.2013 -498.27265 9.597183 [2,] 903.5157903 401.90111 294.0193 -131.3403 740.7987 -75.72735 224.402817 [,8] [,9] [,10] [,11] [,12] [1,] -404.1182 -706.76056 -590.165 182.0850 -2016.54 [2,] 178.1182 98.76056 -147.835 827.9150 1105.54 $out [1] -695 -456 156 -1018 2602 $group [1] 2 4 4 6 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(101, 137, 452, 776, 857, -49, -49, 209, 224, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6mg2s1225703440.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,] 2490.0 2099.0 2061.0 2061.0 1463.0 NA [2,] 2792.5 2289.5 2583.0 2424.5 1881.0 NA [3,] 3078.0 2356.5 2662.5 2803.5 2186.0 NA [4,] 3223.0 2536.5 3132.0 3032.0 2351.5 NA [5,] 3475.0 2873.0 3350.0 3258.0 2640.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2881.646 2243.842 2412.097 2526.415 1971.402 NA [2,] 3274.354 2469.158 2912.903 3080.585 2400.598 NA $out [1] 3870 5072 $group [1] 1 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(2490, 2792.5, 3078, 3223, 3475, 2099, 2289.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7gp7c1225703440.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,] 2128.2 2175.0 2256.50 [2,] 2531.8 2478.5 2488.00 [3,] 2665.1 2639.0 2600.25 [4,] 2803.5 2810.0 2790.00 [5,] 3150.8 3146.0 3049.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 2541.176 2487.801 2462.506 [2,] 2789.024 2790.199 2737.994 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(2128.2, 2531.8, 2665.1, 2803.5, 3150.8, 2175, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1kpok1225703440.ps tmp/1kpok1225703440.png") > system("convert tmp/2n21z1225703440.ps tmp/2n21z1225703440.png") > system("convert tmp/3uwi71225703440.ps tmp/3uwi71225703440.png") > system("convert tmp/4s7z61225703440.ps tmp/4s7z61225703440.png") > system("convert tmp/5rj7o1225703440.ps tmp/5rj7o1225703440.png") > system("convert tmp/6mg2s1225703440.ps tmp/6mg2s1225703440.png") > system("convert tmp/7gp7c1225703440.ps tmp/7gp7c1225703440.png") > > > proc.time() user system elapsed 2.154 1.452 2.378