R version 3.3.3 (2017-03-06) -- "Another Canoe" Copyright (C) 2017 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(20709.9,21227.3,23009.8,20416.2,20929.6,20763.9,19607.4,19419,19584.9,21878,21745.5,19206.8,21041.3,20407.1,22437,21050.3,20415.7,20220.6,20217.8,18286.4,20781.3,21619.6,20417.6,19988.6,21026.9,20128.3,21671.5,21053.2,19978.6,20572.6,20220.4,19107.6,21989.5,21701.2,19758.3,19843.9,18906.2,19071.2,22385.6,20208.5,19261.4,21470.1,19539.9,17665.1,19917.2,20399.5,19263,19026,18375.4,20165,21138.7,21414.3,20799.2,22773.6,19747.2,19910.7,22051.7,21705,22328.8,20910.3) > 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,] 20709.9 21041.3 21026.9 18906.2 18375.4 NA [2,] 21227.3 20407.1 20128.3 19071.2 20165.0 NA [3,] 23009.8 22437.0 21671.5 22385.6 21138.7 NA [4,] 20416.2 21050.3 21053.2 20208.5 21414.3 NA [5,] 20929.6 20415.7 19978.6 19261.4 20799.2 NA [6,] 20763.9 20220.6 20572.6 21470.1 22773.6 NA [7,] 19607.4 20217.8 20220.4 19539.9 19747.2 NA [8,] 19419.0 18286.4 19107.6 17665.1 19910.7 NA [9,] 19584.9 20781.3 21989.5 19917.2 22051.7 NA [10,] 21878.0 21619.6 21701.2 20399.5 21705.0 NA [11,] 21745.5 20417.6 19758.3 19263.0 22328.8 NA [12,] 19206.8 19988.6 19843.9 19026.0 20910.3 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 517.4 -634.2 -898.6 165.0 1789.6 NA [2,] 1782.5 2029.9 1543.2 3314.4 973.7 NA [3,] -2593.6 -1386.7 -618.3 -2177.1 275.6 NA [4,] 513.4 -634.6 -1074.6 -947.1 -615.1 NA [5,] -165.7 -195.1 594.0 2208.7 1974.4 NA [6,] -1156.5 -2.8 -352.2 -1930.2 -3026.4 NA [7,] -188.4 -1931.4 -1112.8 -1874.8 163.5 NA [8,] 165.9 2494.9 2881.9 2252.1 2141.0 NA [9,] 2293.1 838.3 -288.3 482.3 -346.7 NA [10,] -132.5 -1202.0 -1942.9 -1136.5 623.8 NA [11,] -2538.7 -429.0 85.6 -237.0 -1418.5 NA [12,] 1834.5 1038.3 -937.7 -650.6 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/1cms41494446756.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/2m4z61494446756.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/3ekoz1494446756.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/4tkwf1494446756.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,] 18375.4 20128.3 21138.7 20208.5 19261.4 20220.6 19539.9 17665.1 19584.9 [2,] 18906.2 20128.3 21671.5 20416.2 19978.6 20572.6 19607.4 18286.4 19917.2 [3,] 20709.9 20165.0 22385.6 21050.3 20415.7 20763.9 19747.2 19107.6 20781.3 [4,] 21026.9 20407.1 22437.0 21053.2 20799.2 21470.1 20217.8 19419.0 21989.5 [5,] 21041.3 20407.1 23009.8 21414.3 20929.6 22773.6 20220.4 19910.7 22051.7 [,10] [,11] [,12] [1,] 21619.6 19263.0 19026.0 [2,] 21619.6 19758.3 19206.8 [3,] 21701.2 20417.6 19843.9 [4,] 21705.0 21745.5 19988.6 [5,] 21705.0 22328.8 20910.3 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 19211.42 19968 21844.7 20600.2 19835.87 20129.73 19315.89 18307.31 [2,] 22208.38 20362 22926.5 21500.4 20995.53 21398.07 20178.51 19907.89 [,9] [,10] [,11] [,12] [1,] 19317.02 21640.86 19013.45 19291.48 [2,] 22245.58 21761.54 21821.75 20396.32 $out [1] 21227.3 19071.2 21878.0 20399.5 $group [1] 2 2 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(18375.4, 18906.2, 20709.9, 21026.9, 21041.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5rpth1494446756.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] [1,] -898.6 973.7 -2593.6 -1074.6 -195.1 -3026.4 -1931.4 2141.0 -346.7 -1942.9 [2,] -634.2 1543.2 -2177.1 -947.1 -165.7 -1930.2 -1874.8 2141.0 -288.3 -1202.0 [3,] 165.0 1782.5 -1386.7 -634.6 594.0 -1156.5 -1112.8 2252.1 482.3 -1136.5 [4,] 517.4 2029.9 -618.3 -615.1 1974.4 -352.2 -188.4 2494.9 838.3 -132.5 [5,] 1789.6 2029.9 275.6 -615.1 2208.7 -2.8 163.5 2881.9 2293.1 623.8 [,11] [,12] [1,] -2538.7 -937.70 [2,] -1418.5 -794.15 [3,] -429.0 193.85 [4,] -237.0 1436.40 [5,] 85.6 1834.50 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -648.7177 1438.599 -2488.1442 -869.1904 -918.1893 -2271.51082 -2304.40599 [2,] 978.7177 2126.401 -285.2558 -400.0096 2106.1893 -41.48918 78.80599 [,8] [,9] [,10] [,11] [,12] [1,] 2002.035 -313.7527 -1892.206 -1263.8449 -1568.284 [2,] 2502.165 1278.3527 -380.794 405.8449 1955.985 $out [1] 3314.4 513.4 165.9 $group [1] 2 4 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-898.600000000002, -634.200000000001, 165, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6d2jm1494446756.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,] 19206.80 19988.60 19107.60 17665.10 18375.40 NA [2,] 19596.15 20219.20 19911.25 19048.60 20037.85 NA [3,] 20736.90 20416.65 20396.50 19401.45 21024.50 NA [4,] 21486.40 21045.80 21362.35 20304.00 21878.35 NA [5,] 23009.80 21619.60 21989.50 21470.10 22773.60 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 19874.74 20039.63 19734.64 18828.85 20185.04 NA [2,] 21599.06 20793.67 21058.36 19974.05 21863.96 NA $out [1] 22437.0 18286.4 22385.6 $group [1] 2 2 4 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(19206.8, 19596.15, 20736.9, 21486.4, 23009.8, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/79jfn1494446756.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,] 18877.76 19107.60 18852.70 [2,] 19939.24 20004.45 19939.58 [3,] 20489.77 20563.75 20561.80 [4,] 21012.54 20915.80 20987.35 [5,] 22128.52 21701.20 22054.25 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 20000.23 20148.08 20083.9 [2,] 20979.31 20979.42 21039.7 $out [1] 22385.6 $group [1] 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(18877.76, 19939.24, 20489.77, 21012.54, 22128.52, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1cms41494446756.ps tmp/1cms41494446756.png",intern=TRUE)) character(0) > try(system("convert tmp/2m4z61494446756.ps tmp/2m4z61494446756.png",intern=TRUE)) character(0) > try(system("convert tmp/3ekoz1494446756.ps tmp/3ekoz1494446756.png",intern=TRUE)) character(0) > try(system("convert tmp/4tkwf1494446756.ps tmp/4tkwf1494446756.png",intern=TRUE)) character(0) > try(system("convert tmp/5rpth1494446756.ps tmp/5rpth1494446756.png",intern=TRUE)) character(0) > try(system("convert tmp/6d2jm1494446756.ps tmp/6d2jm1494446756.png",intern=TRUE)) character(0) > try(system("convert tmp/79jfn1494446756.ps tmp/79jfn1494446756.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.865 0.475 5.116