R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" 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(77.34,78.15,78.31,78.71,78.68,78.85,78.97,79.47,80.6,82.24,83.25,84.55,85.91,86.84,87.44,87.79,88.08,88.38,88.53,88.79,88.85,89.26,89.31,89.39,89.76,89.94,89.99,90.08,89.95,90.2,89.7,89.5,89.25,89.13,89.07,89.06,89.15,89.38,89.4,89.51,89.62,89.65,89.68,89.92,90.26,90.89,91.08,91.13,91.83,92.66,93.45,93.95,94.12,94.31,94.25,94.51,94.58,94.85,95.31,95.75,96.06,96.4,96.57,96.47,96.34,96.22,96.2,96.71,97.05,97.82,98.22,98.5,98.94,99.5,99.89,100,100.1,100.16,100.05,100.03,100,100.32,100.53,100.49,100.38,100.22,100.5,100.57,100.6,100.23,100.29,100.01,100.13,100.22,100.2,100.34,100.73,100.29,101.11,101.09,101.01,101.27,101.57,101.69,101,101.43,101.13,101.23) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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] 9 9 9 9 9 9 9 9 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 77.34 85.91 89.76 89.15 91.83 96.06 98.94 100.38 100.73 NA [2,] 78.15 86.84 89.94 89.38 92.66 96.40 99.50 100.22 100.29 NA [3,] 78.31 87.44 89.99 89.40 93.45 96.57 99.89 100.50 101.11 NA [4,] 78.71 87.79 90.08 89.51 93.95 96.47 100.00 100.57 101.09 NA [5,] 78.68 88.08 89.95 89.62 94.12 96.34 100.10 100.60 101.01 NA [6,] 78.85 88.38 90.20 89.65 94.31 96.22 100.16 100.23 101.27 NA [7,] 78.97 88.53 89.70 89.68 94.25 96.20 100.05 100.29 101.57 NA [8,] 79.47 88.79 89.50 89.92 94.51 96.71 100.03 100.01 101.69 NA [9,] 80.60 88.85 89.25 90.26 94.58 97.05 100.00 100.13 101.00 NA [10,] 82.24 89.26 89.13 90.89 94.85 97.82 100.32 100.22 101.43 NA [11,] 83.25 89.31 89.07 91.08 95.31 98.22 100.53 100.20 101.13 NA [12,] 84.55 89.39 89.06 91.13 95.75 98.50 100.49 100.34 101.23 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0.81 0.93 0.18 0.23 0.83 0.34 0.56 -0.16 -0.44 NA [2,] 0.16 0.60 0.05 0.02 0.79 0.17 0.39 0.28 0.82 NA [3,] 0.40 0.35 0.09 0.11 0.50 -0.10 0.11 0.07 -0.02 NA [4,] -0.03 0.29 -0.13 0.11 0.17 -0.13 0.10 0.03 -0.08 NA [5,] 0.17 0.30 0.25 0.03 0.19 -0.12 0.06 -0.37 0.26 NA [6,] 0.12 0.15 -0.50 0.03 -0.06 -0.02 -0.11 0.06 0.30 NA [7,] 0.50 0.26 -0.20 0.24 0.26 0.51 -0.02 -0.28 0.12 NA [8,] 1.13 0.06 -0.25 0.34 0.07 0.34 -0.03 0.12 -0.69 NA [9,] 1.64 0.41 -0.12 0.63 0.27 0.77 0.32 0.09 0.43 NA [10,] 1.01 0.05 -0.06 0.19 0.46 0.40 0.21 -0.02 -0.30 NA [11,] 1.30 0.08 -0.01 0.05 0.44 0.28 -0.04 0.14 0.10 NA [12,] 1.36 0.37 0.09 0.70 0.31 0.44 -0.11 0.39 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/1rtqt1476176199.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/2i3id1476176199.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/3g9zi1476176199.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/4wbi21476176199.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,] 77.34 78.15 78.31 78.71 78.68 78.85 78.97 79.47 80.60 82.24 [2,] 89.15 89.38 89.40 89.51 89.62 89.65 89.68 89.50 89.25 89.26 [3,] 91.83 92.66 93.45 93.95 94.12 94.31 94.25 94.51 94.58 94.85 [4,] 98.94 99.50 99.89 100.00 100.10 100.16 100.05 100.01 100.00 100.22 [5,] 100.73 100.29 101.11 101.09 101.01 101.27 101.57 101.69 101.00 101.43 [,11] [,12] [1,] 83.25 84.55 [2,] 89.31 89.39 [3,] 95.31 95.75 [4,] 100.20 100.34 [5,] 101.13 101.23 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 86.67393 87.33013 87.92527 88.42527 88.60053 88.77473 88.78847 88.97473 [2,] 96.98607 97.98987 98.97473 99.47473 99.63947 99.84527 99.71153 100.04527 [,9] [,10] [,11] [,12] [1,] 88.91833 89.07773 89.5746 89.983 [2,] 100.24167 100.62227 101.0454 101.517 $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(77.34, 89.15, 91.83, 98.94, 100.73, 78.15, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/51mos1476176199.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.44 0.02 -0.10 -0.13 -0.12 -0.11 -0.28 -0.25 -0.12 -0.30 -0.04 -0.11 [2,] 0.18 0.16 0.07 -0.08 0.03 -0.06 -0.02 -0.03 0.27 -0.02 0.05 0.20 [3,] 0.34 0.28 0.11 0.03 0.17 0.03 0.24 0.07 0.41 0.19 0.10 0.38 [4,] 0.81 0.60 0.35 0.11 0.25 0.12 0.26 0.34 0.63 0.40 0.28 0.57 [5,] 0.93 0.82 0.50 0.29 0.30 0.30 0.51 0.34 0.77 1.01 0.44 0.70 $n [1] 9 9 9 9 9 9 9 9 9 9 9 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.0082 0.04826667 -0.03746667 -0.07006667 0.05413333 -0.0648 0.09253333 [2,] 0.6718 0.51173333 0.25746667 0.13006667 0.28586667 0.1248 0.38746667 [,8] [,9] [,10] [,11] [,12] [1,] -0.1248667 0.2204 -0.0312 -0.02113333 0.1733127 [2,] 0.2648667 0.5996 0.4112 0.22113333 0.5866873 $out [1] -0.37 -0.50 1.13 -0.69 1.64 1.30 1.36 $group [1] 5 6 8 8 9 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.439999999999998, 0.179999999999993, 0.340000000000003, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6jdxk1476176199.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] [,9] [,10] [1,] 77.340 85.910 89.06 89.150 92.660 96.060 99.890 100.01 100.730 NA [2,] 78.495 87.615 89.19 89.455 93.700 96.280 99.945 100.21 101.005 NA [3,] 78.910 88.455 89.73 89.665 94.280 96.520 100.040 100.26 101.120 NA [4,] 81.420 89.055 89.97 90.575 94.715 97.435 100.240 100.44 101.350 NA [5,] 84.550 89.390 90.20 91.130 95.750 98.500 100.530 100.60 101.690 NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 77.57589 87.79821 89.37424 89.15416 93.81705 95.9932 99.90545 100.1551 [2,] 80.24411 89.11179 90.08576 90.17584 94.74295 97.0468 100.17455 100.3649 [,9] [,10] [1,] 100.9626 NA [2,] 101.2774 NA $out [1] 91.83 98.94 99.50 100.29 $group [1] 5 7 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(77.34, 78.495, 78.91, 81.42, 84.55, 85.91, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7xxmi1476176199.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,] 92.23333 92.660 94.4400 [2,] 93.04611 93.700 94.6350 [3,] 93.25056 94.280 94.7550 [4,] 93.77111 94.715 94.8625 [5,] 94.49333 95.750 94.9050 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 92.91988 93.81705 94.65124 [2,] 93.58123 94.74295 94.85876 $out [1] 91.830 94.045 $group [1] 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(92.2333333333333, 93.0461111111111, 93.2505555555556, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1rtqt1476176199.ps tmp/1rtqt1476176199.png",intern=TRUE)) character(0) > try(system("convert tmp/2i3id1476176199.ps tmp/2i3id1476176199.png",intern=TRUE)) character(0) > try(system("convert tmp/3g9zi1476176199.ps tmp/3g9zi1476176199.png",intern=TRUE)) character(0) > try(system("convert tmp/4wbi21476176199.ps tmp/4wbi21476176199.png",intern=TRUE)) character(0) > try(system("convert tmp/51mos1476176199.ps tmp/51mos1476176199.png",intern=TRUE)) character(0) > try(system("convert tmp/6jdxk1476176199.ps tmp/6jdxk1476176199.png",intern=TRUE)) character(0) > try(system("convert tmp/7xxmi1476176199.ps tmp/7xxmi1476176199.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.495 0.169 2.697