R version 2.10.1 (2009-12-14) 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(1954,2302,3054,2414,2226,2725,2589,3470,2400,3180,4009,3924,2072,2434,2956,2828,2687,2629,3150,4119,3030,3055,3821,4001,2529,2472,3134,2789,2758,2993,3282,3437,2804,3076,3782,3889,2271,2452,3084,2522,2769,3438,2839,3746,2632,2851,3871,3618,2389,2344,2678,2492,2858,2246,2800,3869,3007,3023,3907,4209,2353,2570,2903,2910,3782,2759,2931,3641,2794,3070,3576,4106,2452,2206,2488,2416,2534,2521,3093,3903,2907,3025,3812,4209) > 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] 84 > (np <- floor(n / par1)) [1] 7 > 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] 7 7 7 7 7 7 7 7 7 7 7 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1954 2072 2529 2271 2389 2353 2452 NA [2,] 2302 2434 2472 2452 2344 2570 2206 NA [3,] 3054 2956 3134 3084 2678 2903 2488 NA [4,] 2414 2828 2789 2522 2492 2910 2416 NA [5,] 2226 2687 2758 2769 2858 3782 2534 NA [6,] 2725 2629 2993 3438 2246 2759 2521 NA [7,] 2589 3150 3282 2839 2800 2931 3093 NA [8,] 3470 4119 3437 3746 3869 3641 3903 NA [9,] 2400 3030 2804 2632 3007 2794 2907 NA [10,] 3180 3055 3076 2851 3023 3070 3025 NA [11,] 4009 3821 3782 3871 3907 3576 3812 NA [12,] 3924 4001 3889 3618 4209 4106 4209 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 348 362 -57 181 -45 217 -246 NA [2,] 752 522 662 632 334 333 282 NA [3,] -640 -128 -345 -562 -186 7 -72 NA [4,] -188 -141 -31 247 366 872 118 NA [5,] 499 -58 235 669 -612 -1023 -13 NA [6,] -136 521 289 -599 554 172 572 NA [7,] 881 969 155 907 1069 710 810 NA [8,] -1070 -1089 -633 -1114 -862 -847 -996 NA [9,] 780 25 272 219 16 276 118 NA [10,] 829 766 706 1020 884 506 787 NA [11,] -85 180 107 -253 302 530 397 NA [12,] -1852 -1472 -1618 -1229 -1856 -1654 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/rcomp/tmp/1m7pu1272490119.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/rcomp/tmp/2egpx1272490119.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/rcomp/tmp/3egpx1272490119.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/rcomp/tmp/4egpx1272490119.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] [1,] 1954.0 2206 2488.0 2414.0 2534.0 2246 2589.0 3437.0 2400 3023 3782 [2,] 2171.5 2323 2790.5 2454.0 2610.5 2575 2819.5 3555.5 2713 3024 3797 [3,] 2353.0 2434 2956.0 2522.0 2758.0 2725 2931.0 3746.0 2804 3055 3821 [4,] 2420.5 2462 3069.0 2808.5 2813.5 2876 3121.5 3886.0 2957 3073 3889 [5,] 2529.0 2570 3134.0 2910.0 2858.0 2993 3282.0 4119.0 3030 3076 4009 [,12] [1,] 3618.0 [2,] 3906.5 [3,] 4001.0 [4,] 4157.5 [5,] 4209.0 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2204.301 2350.991 2789.684 2310.298 2636.772 2545.248 2750.650 3548.631 [2,] 2501.699 2517.009 3122.316 2733.702 2879.228 2904.752 3111.350 3943.369 [,9] [,10] [,11] [,12] [1,] 2658.287 3025.738 3766.059 3851.107 [2,] 2949.713 3084.262 3875.941 4150.893 $out [1] 2226 3782 3438 3180 2851 3576 $group [1] 5 5 6 10 10 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1954, 2171.5, 2353, 2420.5, 2529, 2206, 2323, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5p7601272490119.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] [1,] -246.0 282.0 -640.0 -188.0 -1023 -599.0 710 -1114.0 16.0 706.0 -253.0 [2,] -51.0 333.5 -453.5 -86.0 -335 18.0 760 -1079.5 71.5 736.0 11.0 [3,] 181.0 522.0 -186.0 118.0 -13 289.0 881 -996.0 219.0 787.0 180.0 [4,] 282.5 647.0 -100.0 306.5 367 537.5 938 -854.5 274.0 856.5 349.5 [5,] 362.0 752.0 7.0 872.0 669 572.0 1069 -633.0 276.0 1020.0 530.0 [,12] [1,] -1856 [2,] -1852 [3,] -1636 [4,] -1472 [5,] -1229 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -18.16082 334.7829 -397.10450 -116.3947 -432.2231 -21.23702 774.7013 [2,] 380.16082 709.2171 25.10450 352.3947 406.2231 599.23702 987.2987 [,8] [,9] [,10] [,11] [,12] [1,] -1130.3664 98.07027 715.0393 -22.14674 -1881.112 [2,] -861.6336 339.92973 858.9607 382.14674 -1390.888 $out [1] 155 780 506 $group [1] 7 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-246, -51, 181, 282.5, 362, 282, 333.5, 522, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/6p7601272490119.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] [1,] 1954 2072.0 2472.0 2271 2246.0 2353.0 2206.0 NA [2,] 2351 2658.0 2773.5 2577 2440.5 2776.5 2470.0 NA [3,] 2657 2993.0 3034.5 2845 2829.0 2920.5 2720.5 NA [4,] 3325 3485.5 3359.5 3528 3446.0 3608.5 3452.5 NA [5,] 4009 4119.0 3889.0 3871 4209.0 4106.0 4209.0 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2212.752 2615.572 2767.221 2411.243 2370.385 2541.019 2272.375 NA [2,] 3101.248 3370.428 3301.779 3278.757 3287.615 3299.981 3168.625 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(1954, 2351, 2657, 3325, 4009, 2072, 2658, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/70yn31272490119.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,] 2288.571 2353.0 2296.000 [2,] 2691.571 2623.5 2671.625 [3,] 2850.786 2867.5 2882.375 [4,] 3390.357 3400.5 3384.625 [5,] 3993.714 4001.0 4032.000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 2532.065 2513.105 2557.171 [2,] 3169.507 3221.895 3207.579 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(2288.57142857143, 2691.57142857143, 2850.78571428571, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1m7pu1272490119.ps tmp/1m7pu1272490119.png",intern=TRUE)) character(0) > try(system("convert tmp/2egpx1272490119.ps tmp/2egpx1272490119.png",intern=TRUE)) character(0) > try(system("convert tmp/3egpx1272490119.ps tmp/3egpx1272490119.png",intern=TRUE)) character(0) > try(system("convert tmp/4egpx1272490119.ps tmp/4egpx1272490119.png",intern=TRUE)) character(0) > try(system("convert tmp/5p7601272490119.ps tmp/5p7601272490119.png",intern=TRUE)) character(0) > try(system("convert tmp/6p7601272490119.ps tmp/6p7601272490119.png",intern=TRUE)) character(0) > try(system("convert tmp/70yn31272490119.ps tmp/70yn31272490119.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.60 1.53 2.22