R version 3.2.4 (2016-03-10) -- "Very Secure Dishes" 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(74787,49019,56601,47637,49806,50499,42092,39062,44382,43635,41082,17244,70170,43949,52333,41032,47758,76116,30917,32996,31951,26775,30268,18214,47957,31901,35559,30408,30083,35043,30475,28309,31394,36313,40357,38918,44368,33298,29366,28282,30943,32699,29764,25524,29807,35112,32192,36214,47639,33421,28642,26996,27757,36839,33821,30839,35032,38821,40347,68799) > 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] 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,] 74787 70170 47957 44368 47639 NA [2,] 49019 43949 31901 33298 33421 NA [3,] 56601 52333 35559 29366 28642 NA [4,] 47637 41032 30408 28282 26996 NA [5,] 49806 47758 30083 30943 27757 NA [6,] 50499 76116 35043 32699 36839 NA [7,] 42092 30917 30475 29764 33821 NA [8,] 39062 32996 28309 25524 30839 NA [9,] 44382 31951 31394 29807 35032 NA [10,] 43635 26775 36313 35112 38821 NA [11,] 41082 30268 40357 32192 40347 NA [12,] 17244 18214 38918 36214 68799 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -25768 -26221 -16056 -11070 -14218 NA [2,] 7582 8384 3658 -3932 -4779 NA [3,] -8964 -11301 -5151 -1084 -1646 NA [4,] 2169 6726 -325 2661 761 NA [5,] 693 28358 4960 1756 9082 NA [6,] -8407 -45199 -4568 -2935 -3018 NA [7,] -3030 2079 -2166 -4240 -2982 NA [8,] 5320 -1045 3085 4283 4193 NA [9,] -747 -5176 4919 5305 3789 NA [10,] -2553 3493 4044 -2920 1526 NA [11,] -23838 -12054 -1439 4022 28452 NA [12,] 52926 29743 5450 11425 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/18og01458076585.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/2hxjs1458076585.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/3ji161458076585.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/4gbwb1458076585.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,] 44368 31901 28642 26996 27757 32699 29764 25524 29807 35112 30268 17244 [2,] 47639 33298 29366 28282 30083 35043 30475 28309 31394 35112 32192 18214 [3,] 47957 33421 35559 30408 30943 36839 30917 30839 31951 36313 40347 36214 [4,] 70170 43949 52333 41032 47758 50499 33821 32996 35032 38821 40357 38918 [5,] 74787 49019 56601 47637 49806 50499 33821 39062 35032 43635 41082 68799 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 32036.65 25895.03 19330.58 21398.88 18453.89 25917.83 28552.72 27527.18 [2,] 63877.35 40946.97 51787.42 39417.12 43432.11 47760.17 33281.28 34150.82 [,9] [,10] [,11] [,12] [1,] 29380.4 33692.23 34577.63 21584.61 [2,] 34521.6 38933.77 46116.37 50843.39 $out [1] 76116 42092 44382 26775 $group [1] 6 7 9 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(44368, 47639, 47957, 70170, 74787, 31901, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/52j7l1458076585.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,] -26221 -4779 -11301 -325 693 -8407 -4240 3085 -5176 -2920 -23838 5450.0 [2,] -25768 -3932 -8964 761 1756 -8407 -3030 3085 -747 -2553 -12054 8437.5 [3,] -16056 3658 -5151 2169 4960 -4568 -2982 4193 3789 1526 -1439 20584.0 [4,] -14218 7582 -1646 2661 9082 -3018 -2166 4283 4919 3493 4022 41334.5 [5,] -11070 8384 -1084 2661 9082 -2935 -2166 5320 5305 4044 4022 52926.0 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -24217.201 -4477.763 -10321.88037 826.4648 -216.5331 -8375.8538 -3592.5 [2,] -7894.799 11793.763 19.88037 3511.5352 10136.5331 -760.1462 -2371.5 [,8] [,9] [,10] [,11] [,12] [1,] 3346.496 -214.5813 -2746.088 -12798.261 -5404.63 [2,] 5039.504 7792.5813 5798.088 9920.261 46572.63 $out [1] 6726 28358 -45199 2079 -1045 28452 $group [1] 4 5 6 7 8 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-26221, -25768, -16056, -14218, -11070, -4779, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6kdq71458076585.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] [1,] 39062.0 18214.0 28309.0 25524.0 26996.0 NA [2,] 41587.0 30592.5 30441.5 29565.0 29740.5 NA [3,] 46009.5 37014.0 33472.0 31567.5 34426.5 NA [4,] 50152.5 50045.5 37615.5 34205.0 39584.0 NA [5,] 56601.0 76116.0 47957.0 36214.0 47639.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 42102.72 28141.36 30199.89 29451.16 29936.81 NA [2,] 49916.28 45886.64 36744.11 33683.84 38916.19 NA $out [1] 74787 17244 44368 68799 $group [1] 1 1 4 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(39062, 41587, 46009.5, 50152.5, 56601, 18214, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7o2u61458076585.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,] 31346.0 30408 28566.0 [2,] 34692.1 30930 32680.5 [3,] 36490.2 34490 36620.5 [4,] 39408.9 36576 39885.0 [5,] 46239.2 40347 42771.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 34338.84 31914.82 33334.48 [2,] 38641.56 37065.18 39906.52 $out [1] 56984.2 47957.0 58904.5 $group [1] 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(31346, 34692.1, 36490.2, 39408.9, 46239.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/18og01458076585.ps tmp/18og01458076585.png",intern=TRUE)) character(0) > try(system("convert tmp/2hxjs1458076585.ps tmp/2hxjs1458076585.png",intern=TRUE)) character(0) > try(system("convert tmp/3ji161458076585.ps tmp/3ji161458076585.png",intern=TRUE)) character(0) > try(system("convert tmp/4gbwb1458076585.ps tmp/4gbwb1458076585.png",intern=TRUE)) character(0) > try(system("convert tmp/52j7l1458076585.ps tmp/52j7l1458076585.png",intern=TRUE)) character(0) > try(system("convert tmp/6kdq71458076585.ps tmp/6kdq71458076585.png",intern=TRUE)) character(0) > try(system("convert tmp/7o2u61458076585.ps tmp/7o2u61458076585.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.496 0.445 2.966