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.36,90.67,91.21,91.35,91.62,91.28,91.17,91.13,91.55,91.62,91.73,91.91,92.5,92.93,92.77,93.42,93.82,94.02,94.13,93.7,93.84,94.22,95.03,95.03,95.25,96.11,96.16,96.1,96.52,96.35,96.35,96.66,96.86,97.84,98.04,98.06,98.79,99.38,99.75,100.4,100.97,101.16,100.42,99.88,99.8,99.78,99.78,99.89,100.38,100.1,100.02,101.15,100.02,99.99,100.14,98.93,98.52,98.42,98.78,99.04,99.53,99.97,99.95,101.68,101.29,101.45,100.98,100.64,100.6,101.59,101.15,101.03) > 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.36 92.50 95.25 98.79 100.38 99.53 NA [2,] 90.67 92.93 96.11 99.38 100.10 99.97 NA [3,] 91.21 92.77 96.16 99.75 100.02 99.95 NA [4,] 91.35 93.42 96.10 100.40 101.15 101.68 NA [5,] 91.62 93.82 96.52 100.97 100.02 101.29 NA [6,] 91.28 94.02 96.35 101.16 99.99 101.45 NA [7,] 91.17 94.13 96.35 100.42 100.14 100.98 NA [8,] 91.13 93.70 96.66 99.88 98.93 100.64 NA [9,] 91.55 93.84 96.86 99.80 98.52 100.60 NA [10,] 91.62 94.22 97.84 99.78 98.42 101.59 NA [11,] 91.73 95.03 98.04 99.78 98.78 101.15 NA [12,] 91.91 95.03 98.06 99.89 99.04 101.03 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.31 0.43 0.86 0.59 -0.28 0.44 NA [2,] 0.54 -0.16 0.05 0.37 -0.08 -0.02 NA [3,] 0.14 0.65 -0.06 0.65 1.13 1.73 NA [4,] 0.27 0.40 0.42 0.57 -1.13 -0.39 NA [5,] -0.34 0.20 -0.17 0.19 -0.03 0.16 NA [6,] -0.11 0.11 0.00 -0.74 0.15 -0.47 NA [7,] -0.04 -0.43 0.31 -0.54 -1.21 -0.34 NA [8,] 0.42 0.14 0.20 -0.08 -0.41 -0.04 NA [9,] 0.07 0.38 0.98 -0.02 -0.10 0.99 NA [10,] 0.11 0.81 0.20 0.00 0.36 -0.44 NA [11,] 0.18 0.00 0.02 0.11 0.26 -0.12 NA [12,] 0.59 0.22 0.73 0.49 0.49 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/1tb8r1489661422.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/2w6as1489661422.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/32su11489661422.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/4288n1489661422.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] [1,] 90.36 90.670 91.210 91.35 91.62 91.28 91.170 91.130 91.55 91.62 [2,] 92.50 92.930 92.770 93.42 93.82 94.02 94.130 93.700 93.84 94.22 [3,] 97.02 97.745 97.955 98.25 98.27 98.17 98.245 97.795 97.69 98.13 [4,] 99.53 99.970 99.950 101.15 100.97 101.16 100.420 99.880 99.80 99.78 [5,] 100.38 100.100 100.020 101.68 101.29 101.45 100.980 100.640 100.60 101.59 [,11] [,12] [1,] 91.73 91.91 [2,] 95.03 95.03 [3,] 98.41 98.55 [4,] 99.78 99.89 [5,] 101.15 101.03 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.48542 93.20397 93.32367 93.2639 93.65802 93.56447 94.18775 [2,] 101.55458 102.28603 102.58633 103.2361 102.88198 102.77553 102.30225 [,8] [,9] [,10] [,11] [,12] [1,] 93.8087 93.84561 94.54362 95.3461 95.41514 [2,] 101.7813 101.53439 101.71638 101.4739 101.68486 $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.36, 92.5, 97.02, 99.53, 100.38, 90.67, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5hwhw1489661422.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.310 -0.160 -0.06 -1.130 -0.340 -0.740 -1.210 -0.41 -0.100 -0.440 -0.120 [2,] 0.310 -0.080 0.14 -0.390 -0.170 -0.470 -0.540 -0.08 -0.020 0.000 0.000 [3,] 0.435 0.015 0.65 0.335 0.065 -0.055 -0.385 0.05 0.225 0.155 0.065 [4,] 0.590 0.370 1.13 0.420 0.190 0.110 -0.040 0.20 0.980 0.360 0.180 [5,] 0.860 0.540 1.73 0.570 0.200 0.150 0.310 0.42 0.990 0.810 0.260 [,12] [1,] 0.49 [2,] 0.49 [3,] 0.49 [4,] 0.59 [5,] 0.73 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.254391 -0.2752645 0.01141802 -0.1874762 -0.1672116 -0.4291187 [2,] 0.615609 0.3052645 1.28858198 0.8574762 0.2972116 0.3191187 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.70751615 -0.130609 -0.4200323 -0.07721163 -0.05110581 0.4193403 [2,] -0.06248385 0.230609 0.8700323 0.38721163 0.18110581 0.5606597 $out [1] -0.28 0.22 $group [1] 1 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.310000000000002, 0.310000000000002, 0.435000000000002, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6h43i1489661422.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.670 92.500 95.250 99.380 98.420 99.530 NA [2,] 91.150 93.175 96.135 99.765 98.855 100.285 NA [3,] 91.315 93.830 96.435 99.840 100.005 101.005 NA [4,] 91.620 94.175 97.350 100.410 100.120 101.370 NA [5,] 91.910 95.030 98.060 101.160 101.150 101.680 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 91.10063 93.37389 95.88083 99.54581 99.42803 100.5101 NA [2,] 91.52937 94.28611 96.98917 100.13419 100.58197 101.4999 NA $out [1] 90.36 98.79 $group [1] 1 4 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(90.67, 91.15, 91.315, 91.62, 91.91, 92.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7mddj1489661422.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,] 96.13500 97.69 96.26625 [2,] 96.73333 97.77 96.90563 [3,] 97.22167 98.15 97.40000 [4,] 97.37417 98.26 97.63500 [5,] 97.49333 98.55 97.73500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 96.92938 97.92651 97.06733 [2,] 97.51396 98.37349 97.73267 $out [1] 97.02 $group [1] 2 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(96.135, 96.7333333333333, 97.2216666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1tb8r1489661422.ps tmp/1tb8r1489661422.png",intern=TRUE)) character(0) > try(system("convert tmp/2w6as1489661422.ps tmp/2w6as1489661422.png",intern=TRUE)) character(0) > try(system("convert tmp/32su11489661422.ps tmp/32su11489661422.png",intern=TRUE)) character(0) > try(system("convert tmp/4288n1489661422.ps tmp/4288n1489661422.png",intern=TRUE)) character(0) > try(system("convert tmp/5hwhw1489661422.ps tmp/5hwhw1489661422.png",intern=TRUE)) character(0) > try(system("convert tmp/6h43i1489661422.ps tmp/6h43i1489661422.png",intern=TRUE)) character(0) > try(system("convert tmp/7mddj1489661422.ps tmp/7mddj1489661422.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.682 0.199 2.944