R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 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(310,345,365,306,379,336,356,452,354,440,495,360,657,639,620,794,757,737,757,596,869,805,786,731,832,826,907,776,835,715,729,733,736,712,711,667,790,766,1040,949,758,1023,921,775,907,835,871,836,1021,944,915,864,1022,891,1087,822,890,1092,967,833,671,679,862,624,516,650,583,444,562,540,524,683) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.327 (Mon, 30 Nov 2015 07:01:18 +0000) > #Author: root > #To cite this work: Wessa P., (2015), Mean Plot (v1.0.5) 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) > x <- na.omit(x) > (n <- length(x)) [1] 72 > (np <- floor(n / par1)) [1] 6 > 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 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 310 657 832 790 1021 671 NA [2,] 345 639 826 766 944 679 NA [3,] 365 620 907 1040 915 862 NA [4,] 306 794 776 949 864 624 NA [5,] 379 757 835 758 1022 516 NA [6,] 336 737 715 1023 891 650 NA [7,] 356 757 729 921 1087 583 NA [8,] 452 596 733 775 822 444 NA [9,] 354 869 736 907 890 562 NA [10,] 440 805 712 835 1092 540 NA [11,] 495 786 711 871 967 524 NA [12,] 360 731 667 836 833 683 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 35 -18 -6 -24 -77 8 NA [2,] 20 -19 81 274 -29 183 NA [3,] -59 174 -131 -91 -51 -238 NA [4,] 73 -37 59 -191 158 -108 NA [5,] -43 -20 -120 265 -131 134 NA [6,] 20 20 14 -102 196 -67 NA [7,] 96 -161 4 -146 -265 -139 NA [8,] -98 273 3 132 68 118 NA [9,] 86 -64 -24 -72 202 -22 NA [10,] 55 -19 -1 36 -125 -16 NA [11,] -135 -55 -44 -35 -134 159 NA [12,] 297 101 123 185 -162 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/1jht31489527066.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/2qioe1489527066.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/3r6091489527066.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/4wok31489527066.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] [,10] [,11] [,12] [1,] 657.0 639.0 365.0 306 379.0 336 356 444.0 354.0 440.0 495.0 667 [2,] 657.0 639.0 620.0 624 516.0 650 583 452.0 562.0 540.0 524.0 667 [3,] 730.5 722.5 884.5 785 757.5 726 743 664.5 802.5 758.5 748.5 707 [4,] 832.0 826.0 915.0 864 835.0 891 921 775.0 890.0 835.0 871.0 833 [5,] 1021.0 944.0 1040.0 949 1022.0 1023 1087 822.0 907.0 1092.0 967.0 836 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 617.6193 601.879 694.2155 630.1922 551.7347 570.5472 524.9791 456.1546 [2,] 843.3807 843.121 1074.7845 939.8078 963.2653 881.4528 961.0209 872.8454 [,9] [,10] [,11] [,12] [1,] 590.9294 568.2155 524.6738 599.9246 [2,] 1014.0706 948.7845 972.3262 814.0754 $out [1] 310 345 360 $group [1] 1 2 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(657, 657, 730.5, 832, 1021, 639, 639, 722.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5w1oh1489527066.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] [,10] [,11] [,12] [1,] -24 -29.0 -238 -191 -131.0 -102 -265.0 -98 -72 -19.0 -135.0 101 [2,] -24 -19.0 -131 -108 -120.0 -67 -161.0 3 -64 -19.0 -134.0 101 [3,] -12 50.5 -75 11 -31.5 17 -142.5 93 -23 -8.5 -49.5 123 [4,] 8 183.0 -51 73 134.0 20 4.0 132 86 36.0 -35.0 185 [5,] 35 274.0 -51 158 265.0 20 96.0 273 202 55.0 -35.0 297 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -32.641034 -79.79652 -126.60258 -105.7508 -195.3382 -39.11781 -248.93033 [2,] 8.641034 180.79652 -23.39742 127.7508 132.3382 73.11781 -36.06967 [,8] [,9] [,10] [,11] [,12] [1,] 9.790833 -119.75484 -43.97678 -113.3582 63.64581 [2,] 176.209167 73.75484 26.97678 14.3582 182.35419 $out [1] -77 174 196 -125 159 -162 $group [1] 1 3 6 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-24, -24, -12, 8, 35, -29, -19, 50.5, 183, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6yrza1489527066.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] [1,] 306.0 596 667.0 758.0 822.0 444.0 NA [2,] 340.5 648 713.5 782.5 877.0 532.0 NA [3,] 358.0 747 734.5 853.5 929.5 603.5 NA [4,] 409.5 790 829.0 935.0 1021.5 675.0 NA [5,] 495.0 869 907.0 1040.0 1092.0 862.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 326.5286 682.2328 681.8197 783.9437 863.5926 538.2767 NA [2,] 389.4714 811.7672 787.1803 923.0563 995.4074 668.7233 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(306, 340.5, 358, 409.5, 495, 596, 648, 747, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7qxf21489527066.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,] 685.0000 664.50 696.000 [2,] 705.5000 724.25 707.750 [3,] 719.2500 745.75 740.125 [4,] 731.5000 771.75 752.000 [5,] 738.8333 802.50 796.750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 707.3912 724.0849 719.9423 [2,] 731.1088 767.4151 760.3077 $out [1] 784.8333 637.0000 884.5000 626.2500 $group [1] 1 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(685, 705.5, 719.25, 731.5, 738.833333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1jht31489527066.ps tmp/1jht31489527066.png",intern=TRUE)) character(0) > try(system("convert tmp/2qioe1489527066.ps tmp/2qioe1489527066.png",intern=TRUE)) character(0) > try(system("convert tmp/3r6091489527066.ps tmp/3r6091489527066.png",intern=TRUE)) character(0) > try(system("convert tmp/4wok31489527066.ps tmp/4wok31489527066.png",intern=TRUE)) character(0) > try(system("convert tmp/5w1oh1489527066.ps tmp/5w1oh1489527066.png",intern=TRUE)) character(0) > try(system("convert tmp/6yrza1489527066.ps tmp/6yrza1489527066.png",intern=TRUE)) character(0) > try(system("convert tmp/7qxf21489527066.ps tmp/7qxf21489527066.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.949 0.219 3.301