R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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(3469648.00 + ,3456726.00 + ,3443622.00 + ,3416504.00 + ,3684772.00 + ,3670576.00 + ,3469648.00 + ,3336060.00 + ,3348982.00 + ,3348982.00 + ,3363360.00 + ,3389204.00 + ,3429426.00 + ,3429426.00 + ,3403582.00 + ,3336060.00 + ,3684772.00 + ,3737916.00 + ,3657654.00 + ,3469648.00 + ,3550092.00 + ,3429426.00 + ,3483844.00 + ,3509870.00 + ,3536988.00 + ,3469648.00 + ,3483844.00 + ,3389204.00 + ,3684772.00 + ,3778138.00 + ,3697876.00 + ,3550092.00 + ,3710798.00 + ,3536988.00 + ,3697876.00 + ,3684772.00 + ,3724994.00 + ,3577210.00 + ,3737916.00 + ,3724994.00 + ,3966144.00 + ,3911726.00 + ,3697876.00 + ,3590132.00 + ,3737916.00 + ,3536988.00 + ,3684772.00 + ,3710798.00 + ,3765216.00 + ,3644732.00 + ,3710798.00 + ,3751020.00 + ,3898804.00 + ,3778138.00 + ,3617432.00 + ,3443622.00 + ,3604510.00 + ,3162250.00 + ,3376282.00 + ,3496766.00 + ,3617432.00 + ,3443622.00 + ,3443622.00 + ,3443622.00 + ,3536988.00 + ,3403582.00 + ,3228498.00 + ,3081988.00 + ,3188276.00 + ,2773316.00 + ,3027570.00 + ,3175354.00 + ,3202472.00 + ,3054688.00 + ,3067610.00 + ,3027570.00 + ,3162250.00 + ,3067610.00 + ,2881060.00 + ,2746198.00 + ,2974244.00 + ,2479022.00 + ,2800616.00 + ,2947126.00 + ,2947126.00 + ,2773316.00 + ,2612610.00 + ,2599688.00 + ,2746198.00 + ,2612610.00 + ,2358538.00 + ,2183454.00 + ,2371460.00 + ,1929382.00 + ,2331238.00 + ,2545088.00 + ,2612610.00 + ,2464826.00 + ,2278094.00 + ,2411682.00 + ,2464826.00 + ,2424604.00 + ,2022566.00 + ,1836016.00 + ,1969422.00 + ,1567566.00 + ,1982526.00 + ,2130310.00 + ,2250794.00 + ,2049866.00 + ,1861860.00 + ,1969422.00 + ,2022566.00 + ,1916278.00 + ,1514422.00 + ,1339338.00 + ,1500044.00 + ,1057966.00 + ,1540266.00 + ,1836016.00) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Mean Plot (v1.0.4) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_meanplot.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > 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] [1,] 3469648 3429426 3536988 3724994 3765216 3617432 3202472 2947126 2612610 [2,] 3456726 3429426 3469648 3577210 3644732 3443622 3054688 2773316 2464826 [3,] 3443622 3403582 3483844 3737916 3710798 3443622 3067610 2612610 2278094 [4,] 3416504 3336060 3389204 3724994 3751020 3443622 3027570 2599688 2411682 [5,] 3684772 3684772 3684772 3966144 3898804 3536988 3162250 2746198 2464826 [6,] 3670576 3737916 3778138 3911726 3778138 3403582 3067610 2612610 2424604 [7,] 3469648 3657654 3697876 3697876 3617432 3228498 2881060 2358538 2022566 [8,] 3336060 3469648 3550092 3590132 3443622 3081988 2746198 2183454 1836016 [9,] 3348982 3550092 3710798 3737916 3604510 3188276 2974244 2371460 1969422 [10,] 3348982 3429426 3536988 3536988 3162250 2773316 2479022 1929382 1567566 [11,] 3363360 3483844 3697876 3684772 3376282 3027570 2800616 2331238 1982526 [12,] 3389204 3509870 3684772 3710798 3496766 3175354 2947126 2545088 2130310 [,10] [,11] [1,] 2250794 NA [2,] 2049866 NA [3,] 1861860 NA [4,] 1969422 NA [5,] 2022566 NA [6,] 1916278 NA [7,] 1514422 NA [8,] 1339338 NA [9,] 1500044 NA [10,] 1057966 NA [11,] 1540266 NA [12,] 1836016 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -12922 0 -67340 -147784 -120484 -173810 -147784 -173810 -147784 [2,] -13104 -25844 14196 160706 66066 0 12922 -160706 -186732 [3,] -27118 -67522 -94640 -12922 40222 0 -40040 -12922 133588 [4,] 268268 348712 295568 241150 147784 93366 134680 146510 53144 [5,] -14196 53144 93366 -54418 -120666 -133406 -94640 -133588 -40222 [6,] -200928 -80262 -80262 -213850 -160706 -175084 -186550 -254072 -402038 [7,] -133588 -188006 -147784 -107744 -173810 -146510 -134862 -175084 -186550 [8,] 12922 80444 160706 147784 160888 106288 228046 188006 133406 [9,] 0 -120666 -173810 -200928 -442260 -414960 -495222 -442078 -401856 [10,] 14378 54418 160888 147784 214032 254254 321594 401856 414960 [11,] 25844 26026 -13104 26026 120484 147784 146510 213850 147784 [12,] 40222 27118 40222 54418 120666 27118 0 67522 120484 [,10] [,11] [1,] -200928 NA [2,] -188006 NA [3,] 107562 NA [4,] 53144 NA [5,] -106288 NA [6,] -401856 NA [7,] -175084 NA [8,] 160706 NA [9,] -442078 NA [10,] 482300 NA [11,] 295750 NA [12,] 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/wessaorg/rcomp/tmp/1ba3l1438957937.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2cs0j1438957937.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/30usm1438957937.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/4ftgn1438957937.ps",horizontal=F,onefile=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] [1,] 2250794 2049866 1861860 1969422 2022566 1916278 1514422 1339338 1500044 [2,] 2947126 2773316 2612610 2599688 2746198 2612610 2358538 2183454 2371460 [3,] 3449537 3436524 3423602 3362632 3610880 3537079 3349073 3209024 3268629 [4,] 3617432 3469648 3483844 3443622 3684772 3778138 3657654 3469648 3604510 [5,] 3765216 3644732 3737916 3751020 3966144 3911726 3697876 3590132 3737916 [,10] [,11] [,12] [1,] 1057966 1540266 1836016 [2,] 1929382 2331238 2545088 [3,] 2967783 3195465 3282279 [4,] 3429426 3483844 3509870 [5,] 3536988 3697876 3710798 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 3114625 3088609 2988299 2940969 3141931 2954735 2699983 2566390 2652548 [2,] 3784449 3784439 3858905 3784295 4079829 4119423 3998163 3851658 3884710 [,10] [,11] [,12] [1,] 2218301 2619577 2800235 [2,] 3717265 3771353 3764323 $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(2250794, 2947126, 3449537, 3617432, 3765216, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5e81l1438957937.ps",horizontal=F,onefile=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] [1,] -200928 -188006 -94640 53144 -133588 -254072 -188006 80444 -495222 [2,] -173810 -160706 -40040 93366 -120666 -254072 -175084 106288 -442078 [3,] -147784 -6552 -12922 147147 -74529 -193739 -160797 154245 -408408 [4,] -67340 14196 40222 268268 -14196 -160706 -134862 160888 -173810 [5,] 0 160706 133588 348712 93366 -80262 -107744 228046 0 [,10] [,11] [,12] [1,] 14378 -13104 0 [2,] 147784 26026 27118 [3,] 234143 133497 40222 [4,] 401856 147784 67522 [5,] 482300 295750 120666 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -200980.66 -93940.01 -53024.1 59758.99 -127725.66 -240388.4 -180893.5 [2,] -94587.34 80836.01 27180.1 234535.01 -21332.34 -147089.6 -140700.5 [,8] [,9] [,10] [,11] [,12] [1,] 126964.7 -542445.4 107198.5 72661.85 18942.56 [2,] 181525.3 -274370.6 361087.5 194332.15 61501.44 $out [1] -402038 -401856 12922 $group [1] 6 6 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-200928, -173810, -147784, -67340, 0, -188006, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6lv9n1438957937.ps",horizontal=F,onefile=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] [1,] 3336060 3336060 3389204 3536988 3162250 2773316 2746198 1929382 1567566 [2,] 3356171 3429426 3510416 3637452 3470194 3128671 2840838 2344888 1975974 [3,] 3430063 3476746 3617432 3717896 3631082 3316040 3000907 2572388 2204202 [4,] 3469648 3603873 3697876 3737916 3758118 3443622 3067610 2679404 2444715 [5,] 3469648 3737916 3778138 3737916 3898804 3617432 3202472 2947126 2612610 [,10] [,11] [1,] 1057966 NA [2,] 1507233 NA [3,] 1848938 NA [4,] 1995994 NA [5,] 2250794 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 3378305 3397180 3531930 3672074 3499758 3172389 2897475 2419813 1990406 [2,] 3481821 3556312 3702934 3763718 3762406 3459691 3104339 2724963 2417998 [,10] [,11] [1,] 1626011 NA [2,] 2071865 NA $out [1] 3684772 3670576 3966144 3911726 2479022 $group [1] 1 1 4 4 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(3336060, 3356171, 3430063, 3469648, 3469648, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/759x61438957937.ps",horizontal=F,onefile=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,] 2682189 2967783 2738054 [2,] 2962205 3238826 3004649 [3,] 3073443 3355852 3073923 [4,] 3183262 3443030 3201130 [5,] 3285209 3610880 3304142 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 2972617 3262714 2984307 [2,] 3174269 3448991 3163539 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(2682188.6, 2962204.7, 3073443.1, 3183261.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1ba3l1438957937.ps tmp/1ba3l1438957937.png",intern=TRUE)) character(0) > try(system("convert tmp/2cs0j1438957937.ps tmp/2cs0j1438957937.png",intern=TRUE)) character(0) > try(system("convert tmp/30usm1438957937.ps tmp/30usm1438957937.png",intern=TRUE)) character(0) > try(system("convert tmp/4ftgn1438957937.ps tmp/4ftgn1438957937.png",intern=TRUE)) character(0) > try(system("convert tmp/5e81l1438957937.ps tmp/5e81l1438957937.png",intern=TRUE)) character(0) > try(system("convert tmp/6lv9n1438957937.ps tmp/6lv9n1438957937.png",intern=TRUE)) character(0) > try(system("convert tmp/759x61438957937.ps tmp/759x61438957937.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.546 0.429 3.002