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(584302,221901,252972,109429,306752,119246,129566,57940,277550,102655,123406,51489,118487,49140,54874,14472,65112,28389,29148,7575,53375,20751,25726,6897,333776,119850,140239,73686,173658,63922,71367,38369,160117,55928,68872,35318,132040,52910,57858,21271,67982,26934,29051,11997,64058,25976,28807,9274) > 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] 48 > (np <- floor(n / par1)) [1] 4 > 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] 4 4 4 4 4 4 4 4 4 4 4 4 > arr [,1] [,2] [,3] [,4] [,5] [1,] 584302 118487 333776 132040 NA [2,] 221901 49140 119850 52910 NA [3,] 252972 54874 140239 57858 NA [4,] 109429 14472 73686 21271 NA [5,] 306752 65112 173658 67982 NA [6,] 119246 28389 63922 26934 NA [7,] 129566 29148 71367 29051 NA [8,] 57940 7575 38369 11997 NA [9,] 277550 53375 160117 64058 NA [10,] 102655 20751 55928 25976 NA [11,] 123406 25726 68872 28807 NA [12,] 51489 6897 35318 9274 NA > darr [,1] [,2] [,3] [,4] [,5] [1,] -362401 -69347 -213926 -79130 NA [2,] 31071 5734 20389 4948 NA [3,] -143543 -40402 -66553 -36587 NA [4,] 197323 50640 99972 46711 NA [5,] -187506 -36723 -109736 -41048 NA [6,] 10320 759 7445 2117 NA [7,] -71626 -21573 -32998 -17054 NA [8,] 219610 45800 121748 52061 NA [9,] -174895 -32624 -104189 -38082 NA [10,] 20751 4975 12944 2831 NA [11,] -71917 -18829 -33554 -19533 NA [12,] 66998 326879 96722 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/1eu7k1489522456.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/2ucxx1489522456.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/330q51489522456.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/4zgku1489522456.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] [1,] 118487.0 49140.0 54874.0 14472.0 65112 26934.0 29051.0 7575.0 [2,] 125263.5 51025.0 56366.0 17871.5 66547 27661.5 29099.5 9786.0 [3,] 232908.0 86380.0 99048.5 47478.5 120820 46155.5 50257.5 25183.0 [4,] 459039.0 170875.5 196605.5 91557.5 240205 91584.0 100466.5 48154.5 [5,] 584302.0 221901.0 252972.0 109429.0 306752 119246.0 129566.0 57940.0 [,9] [,10] [,11] [,12] [1,] 53375.0 20751.0 25726.0 6897.0 [2,] 58716.5 23363.5 27266.5 8085.5 [3,] 112087.5 40952.0 48839.5 22296.0 [4,] 218833.5 79291.5 96139.0 43403.5 [5,] 277550.0 102655.0 123406.0 51489.0 $n [1] 4 4 4 4 4 4 4 4 4 4 4 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -30774.65 -8301.895 -11740.71 -10733.44 -16369.82 -4343.275 -6122.43 [2,] 496590.65 181061.895 209837.71 105690.44 258009.82 96654.275 106637.43 [,8] [,9] [,10] [,11] [,12] [1,] -5128.115 -14404.93 -3231.12 -5569.775 -5605.22 [2,] 55494.115 238579.93 85135.12 103248.775 50197.22 $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(118487, 125263.5, 232908, 459039, 584302, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5ewga1489522456.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] [1,] -362401.0 4948.0 -143543.0 46711.0 -187506.0 759.0 -71626.0 45800.0 [2,] -288163.5 5341.0 -105048.0 48675.5 -148621.0 1438.0 -52312.0 48930.5 [3,] -146528.0 13061.5 -53477.5 75306.0 -75392.0 4781.0 -27285.5 86904.5 [4,] -74238.5 25730.0 -38494.5 148647.5 -38885.5 8882.5 -19313.5 170679.0 [5,] -69347.0 31071.0 -36587.0 197323.0 -36723.0 10320.0 -17054.0 219610.0 [,9] [,10] [,11] [,12] [1,] -174895.0 2831.0 -71917.0 66998.0 [2,] -139542.0 3903.0 -52735.5 81860.0 [3,] -71135.5 8959.5 -26543.5 96722.0 [4,] -35353.0 16847.5 -19181.0 211800.5 [5,] -32624.0 20751.0 -18829.0 326879.0 $n [1] 4 4 4 4 4 4 4 4 4 4 4 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -315528.75 -3045.81 -106054.765 -3671.88 -162083.04 -1100.155 -53354.315 [2,] 22472.75 29168.81 -900.235 154283.88 11299.04 10662.155 -1216.685 [,8] [,9] [,10] [,11] [,12] [1,] -9276.815 -153444.81 -1266.655 -53051.555 -21811.47 [2,] 183085.815 11173.81 19185.655 -35.445 215255.47 $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(-362401, -288163.5, -146528, -74238.5, -69347, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6bw4b1489522456.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] [1,] 51489 6897.0 35318.0 9274.0 NA [2,] 106042 17611.5 59925.0 23623.5 NA [3,] 126486 28768.5 72526.5 28929.0 NA [4,] 265261 54124.5 150178.0 60958.0 NA [5,] 306752 65112.0 173658.0 67982.0 NA $n [1] 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [1,] 53865.15 12114.68 31361.5 11900.48 NA [2,] 199106.85 45422.32 113691.5 45957.52 NA $out [1] 584302 118487 333776 132040 $group [1] 1 2 3 4 $names [1] "1" "2" "3" "4" NA Warning message: In bxp(list(stats = c(51489, 106042, 126486, 265261, 306752, 6897, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7h8j41489522456.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,] 25744.50 22296.00 24020.25 [2,] 53021.00 43553.75 48618.12 [3,] 63242.88 49548.50 56395.69 [4,] 132630.38 105568.00 119099.19 [5,] 153376.00 120820.00 137098.00 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 26932.50 21263.38 24248.80 [2,] 99553.25 77833.62 88542.57 $out [1] 292151.2 232908.0 262529.6 $group [1] 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(25744.5, 53021, 63242.875, 132630.375, 153376, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1eu7k1489522456.ps tmp/1eu7k1489522456.png",intern=TRUE)) character(0) > try(system("convert tmp/2ucxx1489522456.ps tmp/2ucxx1489522456.png",intern=TRUE)) character(0) > try(system("convert tmp/330q51489522456.ps tmp/330q51489522456.png",intern=TRUE)) character(0) > try(system("convert tmp/4zgku1489522456.ps tmp/4zgku1489522456.png",intern=TRUE)) character(0) > try(system("convert tmp/5ewga1489522456.ps tmp/5ewga1489522456.png",intern=TRUE)) character(0) > try(system("convert tmp/6bw4b1489522456.ps tmp/6bw4b1489522456.png",intern=TRUE)) character(0) > try(system("convert tmp/7h8j41489522456.ps tmp/7h8j41489522456.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.746 0.209 3.007