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(90.33,90.62,91.22,91.39,91.72,91.32,91.1,91.05,91.45,91.53,91.63,91.78,92.32,92.8,92.65,93.35,93.63,93.76,93.83,93.37,93.41,93.84,94.66,94.65,94.91,95.81,95.87,95.84,96.31,96.17,96.16,96.48,96.61,97.68,97.83,97.88,98.63,99.25,99.64,100.47,101.12,101.33,100.5,99.93,99.81,99.74,99.72,99.87,100.39,100.09,100.03,101.2,99.96,99.94,100.01,98.69,98.19,98.08,98.46,98.75,99.25,99.68,99.64,101.46,100.99,101.12,100.6,100.24,100.16,101.25,100.74,100.61) > 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,] 90.33 92.32 94.91 98.63 100.39 99.25 NA [2,] 90.62 92.80 95.81 99.25 100.09 99.68 NA [3,] 91.22 92.65 95.87 99.64 100.03 99.64 NA [4,] 91.39 93.35 95.84 100.47 101.20 101.46 NA [5,] 91.72 93.63 96.31 101.12 99.96 100.99 NA [6,] 91.32 93.76 96.17 101.33 99.94 101.12 NA [7,] 91.10 93.83 96.16 100.50 100.01 100.60 NA [8,] 91.05 93.37 96.48 99.93 98.69 100.24 NA [9,] 91.45 93.41 96.61 99.81 98.19 100.16 NA [10,] 91.53 93.84 97.68 99.74 98.08 101.25 NA [11,] 91.63 94.66 97.83 99.72 98.46 100.74 NA [12,] 91.78 94.65 97.88 99.87 98.75 100.61 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.29 0.48 0.90 0.62 -0.30 0.43 NA [2,] 0.60 -0.15 0.06 0.39 -0.06 -0.04 NA [3,] 0.17 0.70 -0.03 0.83 1.17 1.82 NA [4,] 0.33 0.28 0.47 0.65 -1.24 -0.47 NA [5,] -0.40 0.13 -0.14 0.21 -0.02 0.13 NA [6,] -0.22 0.07 -0.01 -0.83 0.07 -0.52 NA [7,] -0.05 -0.46 0.32 -0.57 -1.32 -0.36 NA [8,] 0.40 0.04 0.13 -0.12 -0.50 -0.08 NA [9,] 0.08 0.43 1.07 -0.07 -0.11 1.09 NA [10,] 0.10 0.82 0.15 -0.02 0.38 -0.51 NA [11,] 0.15 -0.01 0.05 0.15 0.29 -0.13 NA [12,] 0.54 0.26 0.75 0.52 0.50 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/19suy1489531040.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/276ia1489531040.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/3728r1489531040.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/4q5vn1489531040.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,] 90.33 90.62 91.220 91.390 91.720 91.320 91.100 91.050 91.45 [2,] 92.32 92.80 92.650 93.350 93.630 93.760 93.830 93.370 93.41 [3,] 96.77 97.53 97.755 98.155 98.135 98.055 98.085 97.585 97.40 [4,] 99.25 99.68 99.640 101.200 100.990 101.120 100.500 99.930 99.81 [5,] 100.39 100.09 100.030 101.460 101.120 101.330 100.600 100.240 100.16 [,10] [,11] [,12] [1,] 91.53 91.630 91.780 [2,] 93.84 94.660 94.650 [3,] 97.88 98.145 98.315 [4,] 99.74 99.720 99.870 [5,] 101.25 100.740 100.610 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.29993 93.09218 93.24622 93.0915 93.38756 93.30756 93.78263 [2,] 101.24007 101.96782 102.26378 103.2185 102.88244 102.80244 102.38737 [,8] [,9] [,10] [,11] [,12] [1,] 93.35359 93.27179 94.07431 94.88114 94.94793 [2,] 101.81641 101.52821 101.68569 101.40886 101.68207 $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(90.33, 92.32, 96.77, 99.25, 100.39, 90.62, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5rbaa1489531040.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] [1,] 0.290 -0.15 -0.030 -1.240 -0.400 -0.830 -1.32 -0.12 -0.110 -0.510 -0.13 [2,] 0.290 -0.06 0.170 -0.470 -0.140 -0.520 -0.57 -0.12 -0.070 -0.020 -0.01 [3,] 0.455 0.01 0.765 0.305 0.055 -0.115 -0.41 -0.02 0.255 0.125 0.10 [4,] 0.620 0.39 1.170 0.470 0.130 0.070 -0.05 0.13 1.070 0.380 0.15 [5,] 0.900 0.60 1.820 0.650 0.210 0.070 0.32 0.40 1.090 0.820 0.29 [,12] [1,] 0.50 [2,] 0.50 [3,] 0.52 [4,] 0.54 [5,] 0.54 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.2421393 -0.2802645 0.1199677 -0.3013304 -0.1191587 -0.4955691 -0.7454168 [2,] 0.6678607 0.3002645 1.4100323 0.9113304 0.2291587 0.2655691 -0.0745832 [,8] [,9] [,10] [,11] [,12] [1,] -0.1812581 -0.4803368 -0.1330129 -0.003205168 0.4917361 [2,] 0.1412581 0.9903368 0.3830129 0.203205168 0.5482639 $out [1] -0.30 -0.50 0.26 0.75 $group [1] 1 8 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.290000000000006, 0.290000000000006, 0.455000000000005, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6aus11489531040.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,] 90.330 92.320 94.910 98.630 98.080 99.250 NA [2,] 91.075 93.075 95.855 99.680 98.575 99.920 NA [3,] 91.355 93.520 96.240 99.840 99.950 100.605 NA [4,] 91.580 93.835 97.145 100.485 100.060 101.055 NA [5,] 91.780 94.660 97.880 101.330 101.200 101.460 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 91.12467 93.17336 95.65162 99.47283 99.27268 100.0873 NA [2,] 91.58533 93.86664 96.82838 100.20717 100.62732 101.1227 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(90.33, 91.075, 91.355, 91.58, 91.78, 92.32, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7qsck1489531040.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,] 95.97167 96.7700 96.03125 [2,] 96.55667 97.5575 96.68500 [3,] 97.02667 97.9675 97.22875 [4,] 97.26500 98.1400 97.50562 [5,] 97.28833 98.3150 97.59375 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 96.70359 97.70182 96.85446 [2,] 97.34974 98.23318 97.60304 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(95.9716666666667, 96.5566666666667, 97.0266666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/19suy1489531040.ps tmp/19suy1489531040.png",intern=TRUE)) character(0) > try(system("convert tmp/276ia1489531040.ps tmp/276ia1489531040.png",intern=TRUE)) character(0) > try(system("convert tmp/3728r1489531040.ps tmp/3728r1489531040.png",intern=TRUE)) character(0) > try(system("convert tmp/4q5vn1489531040.ps tmp/4q5vn1489531040.png",intern=TRUE)) character(0) > try(system("convert tmp/5rbaa1489531040.ps tmp/5rbaa1489531040.png",intern=TRUE)) character(0) > try(system("convert tmp/6aus11489531040.ps tmp/6aus11489531040.png",intern=TRUE)) character(0) > try(system("convert tmp/7qsck1489531040.ps tmp/7qsck1489531040.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.889 0.186 3.198