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(93.55,94.11,94.34,94.38,94.39,94.42,94.42,94.47,94.59,94.63,94.84,94.98,95.19,95.76,96.04,96.08,96.2,96.29,96.3,96.31,96.46,96.66,96.83,97,97.1,97.16,97.31,97.33,97.4,97.4,97.52,97.77,98,98.2,98.48,98.53,98.71,99.03,99.52,99.65,99.94,99.98,100.12,100.17,100.38,100.75,100.84,100.9,100.91,101.15,101.25,101.39,101.4,101.53,101.55,101.58,101.58,101.65,101.7,101.71,101.71,101.73,101.73,101.75,101.84,101.95,101.95,101.98,101.99,102.03,102.11,102.14,102.18,102.2,102.28,102.29,102.32,102.33,102.33,102.36,102.54,102.58,102.79,103.01) > 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] 84 > (np <- floor(n / par1)) [1] 7 > 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] 7 7 7 7 7 7 7 7 7 7 7 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 93.55 95.19 97.10 98.71 100.91 101.71 102.18 NA [2,] 94.11 95.76 97.16 99.03 101.15 101.73 102.20 NA [3,] 94.34 96.04 97.31 99.52 101.25 101.73 102.28 NA [4,] 94.38 96.08 97.33 99.65 101.39 101.75 102.29 NA [5,] 94.39 96.20 97.40 99.94 101.40 101.84 102.32 NA [6,] 94.42 96.29 97.40 99.98 101.53 101.95 102.33 NA [7,] 94.42 96.30 97.52 100.12 101.55 101.95 102.33 NA [8,] 94.47 96.31 97.77 100.17 101.58 101.98 102.36 NA [9,] 94.59 96.46 98.00 100.38 101.58 101.99 102.54 NA [10,] 94.63 96.66 98.20 100.75 101.65 102.03 102.58 NA [11,] 94.84 96.83 98.48 100.84 101.70 102.11 102.79 NA [12,] 94.98 97.00 98.53 100.90 101.71 102.14 103.01 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0.56 0.57 0.06 0.32 0.24 0.02 0.02 NA [2,] 0.23 0.28 0.15 0.49 0.10 0.00 0.08 NA [3,] 0.04 0.04 0.02 0.13 0.14 0.02 0.01 NA [4,] 0.01 0.12 0.07 0.29 0.01 0.09 0.03 NA [5,] 0.03 0.09 0.00 0.04 0.13 0.11 0.01 NA [6,] 0.00 0.01 0.12 0.14 0.02 0.00 0.00 NA [7,] 0.05 0.01 0.25 0.05 0.03 0.03 0.03 NA [8,] 0.12 0.15 0.23 0.21 0.00 0.01 0.18 NA [9,] 0.04 0.20 0.20 0.37 0.07 0.04 0.04 NA [10,] 0.21 0.17 0.28 0.09 0.05 0.08 0.21 NA [11,] 0.14 0.17 0.05 0.06 0.01 0.03 0.22 NA [12,] 0.21 0.10 0.18 0.01 0.00 0.04 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/1tu7r1489413860.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/2v6nz1489413860.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/3ygxt1489413860.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/4et751489413860.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,] 93.550 94.11 94.340 94.380 94.39 94.420 94.42 94.47 94.590 94.63 [2,] 96.145 96.46 96.675 96.705 96.80 96.845 96.91 97.04 97.230 97.43 [3,] 98.710 99.03 99.520 99.650 99.94 99.980 100.12 100.17 100.380 100.75 [4,] 101.310 101.44 101.490 101.570 101.62 101.740 101.75 101.78 101.785 101.84 [5,] 102.180 102.20 102.280 102.290 102.32 102.330 102.33 102.36 102.540 102.58 [,11] [,12] [1,] 94.840 94.980 [2,] 97.655 97.765 [3,] 100.840 100.900 [4,] 101.905 101.925 [5,] 102.790 103.010 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 95.62555 96.05602 96.64456 96.7447 97.06157 97.05678 97.22963 [2,] 101.79445 102.00398 102.39544 102.5553 102.81843 102.90322 103.01037 [,8] [,9] [,10] [,11] [,12] [1,] 97.33935 97.65983 98.11642 98.30197 98.41572 [2,] 103.00065 103.10017 103.38358 103.37803 103.38428 $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(93.55, 96.145, 98.71, 101.31, 102.18, 94.11, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5qmlz1489413860.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,] 0.02 0.000 0.010 0.010 0.00 0.00 0.01 0.000 0.04 0.050 0.010 0.00 [2,] 0.04 0.090 0.020 0.020 0.02 0.00 0.03 0.065 0.04 0.085 0.040 0.01 [3,] 0.24 0.150 0.040 0.070 0.04 0.01 0.03 0.150 0.07 0.170 0.060 0.07 [4,] 0.44 0.255 0.085 0.105 0.10 0.07 0.05 0.195 0.20 0.210 0.155 0.18 [5,] 0.57 0.490 0.140 0.120 0.13 0.14 0.05 0.230 0.37 0.280 0.220 0.21 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.001126453 0.05146466 0.001183049 0.01923937 -0.007774709 -0.03180287 [2,] 0.478873547 0.24853534 0.078816951 0.12076063 0.087774709 0.05180287 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.01805632 0.0723661 -0.02554942 0.09535202 -0.008676145 -0.03965549 [2,] 0.04194368 0.2276339 0.16554942 0.24464798 0.128676145 0.17965549 $out [1] 0.29 0.25 $group [1] 4 7 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.019999999999996, 0.0400000000000063, 0.240000000000009, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/652ks1489413860.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] [,8] [1,] 94.11 95.760 97.10 98.710 100.910 101.71 102.180 NA [2,] 94.36 96.060 97.32 99.585 101.320 101.74 102.285 NA [3,] 94.42 96.295 97.46 100.050 101.540 101.95 102.330 NA [4,] 94.61 96.560 98.10 100.565 101.615 102.01 102.560 NA [5,] 94.98 97.000 98.53 100.900 101.710 102.14 102.790 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 94.30597 96.06695 97.10424 99.60302 101.4054 101.8269 102.2046 NA [2,] 94.53403 96.52305 97.81576 100.49698 101.6746 102.0731 102.4554 NA $out [1] 93.55 95.19 103.01 $group [1] 1 2 7 $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(94.11, 94.36, 94.42, 94.61, 94.98, 95.76, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/78hci1489413860.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,] 98.47857 98.710 98.72750 [2,] 98.95286 99.585 99.11000 [3,] 99.14929 100.050 99.31125 [4,] 99.43143 100.565 99.57125 [5,] 99.75286 100.900 99.84500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 98.93101 99.60302 99.10087 [2,] 99.36757 100.49698 99.52163 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(98.4785714285714, 98.9528571428571, 99.1492857142857, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1tu7r1489413860.ps tmp/1tu7r1489413860.png",intern=TRUE)) character(0) > try(system("convert tmp/2v6nz1489413860.ps tmp/2v6nz1489413860.png",intern=TRUE)) character(0) > try(system("convert tmp/3ygxt1489413860.ps tmp/3ygxt1489413860.png",intern=TRUE)) character(0) > try(system("convert tmp/4et751489413860.ps tmp/4et751489413860.png",intern=TRUE)) character(0) > try(system("convert tmp/5qmlz1489413860.ps tmp/5qmlz1489413860.png",intern=TRUE)) character(0) > try(system("convert tmp/652ks1489413860.ps tmp/652ks1489413860.png",intern=TRUE)) character(0) > try(system("convert tmp/78hci1489413860.ps tmp/78hci1489413860.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.956 0.279 3.353