R version 3.2.4 (2016-03-10) -- "Very Secure Dishes" 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(89.72,89.95,90.19,90.23,90.32,90.86,90.99,90.98,91.22,91.42,91.55,91.67,92.30,92.92,93.10,93.23,93.36,93.42,93.58,93.68,94.02,94.29,94.54,94.64,96.70,96.83,97.07,97.11,97.42,97.44,97.67,97.84,98.17,98.31,98.42,98.44,98.89,99.26,99.59,99.82,99.95,99.99,100.28,100.38,100.46,100.52,100.43,100.44,101.33,101.43,101.41,101.53,101.58,101.73,102.12,101.86,101.93,101.86,101.92,102.02) > 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,] 89.72 92.30 96.70 98.89 101.33 NA [2,] 89.95 92.92 96.83 99.26 101.43 NA [3,] 90.19 93.10 97.07 99.59 101.41 NA [4,] 90.23 93.23 97.11 99.82 101.53 NA [5,] 90.32 93.36 97.42 99.95 101.58 NA [6,] 90.86 93.42 97.44 99.99 101.73 NA [7,] 90.99 93.58 97.67 100.28 102.12 NA [8,] 90.98 93.68 97.84 100.38 101.86 NA [9,] 91.22 94.02 98.17 100.46 101.93 NA [10,] 91.42 94.29 98.31 100.52 101.86 NA [11,] 91.55 94.54 98.42 100.43 101.92 NA [12,] 91.67 94.64 98.44 100.44 102.02 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.23 0.62 0.13 0.37 0.10 NA [2,] 0.24 0.18 0.24 0.33 -0.02 NA [3,] 0.04 0.13 0.04 0.23 0.12 NA [4,] 0.09 0.13 0.31 0.13 0.05 NA [5,] 0.54 0.06 0.02 0.04 0.15 NA [6,] 0.13 0.16 0.23 0.29 0.39 NA [7,] -0.01 0.10 0.17 0.10 -0.26 NA [8,] 0.24 0.34 0.33 0.08 0.07 NA [9,] 0.20 0.27 0.14 0.06 -0.07 NA [10,] 0.13 0.25 0.11 -0.09 0.06 NA [11,] 0.12 0.10 0.02 0.01 0.10 NA [12,] 0.63 2.06 0.45 0.89 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/1ng7h1458041418.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/2us141458041418.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/371ux1458041418.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/46xmw1458041418.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,] 89.72 89.95 90.19 90.23 90.32 90.86 90.99 90.98 91.22 91.42 [2,] 92.30 92.92 93.10 93.23 93.36 93.42 93.58 93.68 94.02 94.29 [3,] 96.70 96.83 97.07 97.11 97.42 97.44 97.67 97.84 98.17 98.31 [4,] 98.89 99.26 99.59 99.82 99.95 99.99 100.28 100.38 100.46 100.52 [5,] 101.33 101.43 101.41 101.53 101.58 101.73 102.12 101.86 101.93 101.86 [,11] [,12] [1,] 91.55 91.67 [2,] 94.54 94.64 [3,] 98.42 98.44 [4,] 100.43 100.44 [5,] 101.92 102.02 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 92.04352 92.35017 92.48418 92.45352 92.76352 92.79765 92.9358 [2,] 101.35648 101.30983 101.65582 101.76648 102.07648 102.08235 102.4042 [,8] [,9] [,10] [,11] [,12] [1,] 93.1058 93.61951 93.9079 94.25814 94.34173 [2,] 102.5742 102.72049 102.7121 102.58186 102.53827 $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(89.72, 92.3, 96.7, 98.89, 101.33, 89.95, 92.92, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5qruq1458041418.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.10 0.18 0.04 0.05 0.02 0.13 -0.01 0.07 -0.07 0.06 0.01 0.450 [2,] 0.13 0.18 0.04 0.09 0.04 0.16 -0.01 0.08 0.06 0.06 0.02 0.540 [3,] 0.23 0.24 0.12 0.13 0.06 0.23 0.10 0.24 0.14 0.11 0.10 0.760 [4,] 0.37 0.24 0.13 0.13 0.15 0.29 0.10 0.33 0.20 0.13 0.10 1.475 [5,] 0.62 0.33 0.23 0.13 0.15 0.39 0.17 0.34 0.27 0.13 0.12 2.060 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.0604166 0.1976042 0.05640623 0.1017361 -0.01772572 0.1381423 0.02227428 [2,] 0.3995834 0.2823958 0.18359377 0.1582639 0.13772572 0.3218577 0.17772572 [,8] [,9] [,10] [,11] [,12] [1,] 0.06335063 0.04107635 0.06053818 0.0434722 0.02135 [2,] 0.41664937 0.23892365 0.15946182 0.1565278 1.49865 $out [1] -0.02 0.31 0.54 -0.26 0.25 -0.09 $group [1] 2 4 5 7 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.100000000000009, 0.129999999999995, 0.230000000000004, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6r2kg1458041418.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,] 89.72 92.300 96.700 98.890 101.330 NA [2,] 90.21 93.165 97.090 99.705 101.480 NA [3,] 90.92 93.500 97.555 100.135 101.795 NA [4,] 91.32 94.155 98.240 100.435 101.925 NA [5,] 91.67 94.640 98.440 100.520 102.120 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 90.41372 93.04845 97.03048 99.80204 101.592 NA [2,] 91.42628 93.95155 98.07952 100.46796 101.998 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(89.72, 90.21, 90.92, 91.32, 91.67, 92.3, 93.165, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7nv8e1458041418.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.788 96.700 95.5950 [2,] 96.328 97.090 96.4350 [3,] 96.808 97.555 96.8175 [4,] 97.220 98.240 97.3225 [5,] 97.442 98.440 97.5400 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 96.40115 97.03048 96.41271 [2,] 97.21485 98.07952 97.22229 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(95.788, 96.328, 96.808, 97.22, 97.442, 96.7, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1ng7h1458041418.ps tmp/1ng7h1458041418.png",intern=TRUE)) character(0) > try(system("convert tmp/2us141458041418.ps tmp/2us141458041418.png",intern=TRUE)) character(0) > try(system("convert tmp/371ux1458041418.ps tmp/371ux1458041418.png",intern=TRUE)) character(0) > try(system("convert tmp/46xmw1458041418.ps tmp/46xmw1458041418.png",intern=TRUE)) character(0) > try(system("convert tmp/5qruq1458041418.ps tmp/5qruq1458041418.png",intern=TRUE)) character(0) > try(system("convert tmp/6r2kg1458041418.ps tmp/6r2kg1458041418.png",intern=TRUE)) character(0) > try(system("convert tmp/7nv8e1458041418.ps tmp/7nv8e1458041418.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.795 0.502 3.334