R version 3.3.3 (2017-03-06) -- "Another Canoe" Copyright (C) 2017 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(92.81,92.82,92.82,92.88,93.38,93.89,94.1,94.18,94.3,94.31,94.36,94.38,94.38,94.5,94.57,94.89,96.71,97.57,97.88,97.97,98.4,98.51,98.46,98.46,98.48,98.6,98.6,98.71,99.13,99.2,99.3,100.18,101.37,101.77,102.28,102.38,102.35,103.23,105.37,106.62,107,107.24,107.31,107.35,107.42,107.58,107.64,107.64,107.68,108.51,110.37,111.31,111.57,111.66,111.69,111.9,111.95,112.04,112.13,112.14,112.13,113.59,115.03,115.7,116.1,116.12,116.32,116.51,116.63,116.92,116.96,117.15) > 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,] 92.81 94.38 98.48 102.35 107.68 112.13 NA [2,] 92.82 94.50 98.60 103.23 108.51 113.59 NA [3,] 92.82 94.57 98.60 105.37 110.37 115.03 NA [4,] 92.88 94.89 98.71 106.62 111.31 115.70 NA [5,] 93.38 96.71 99.13 107.00 111.57 116.10 NA [6,] 93.89 97.57 99.20 107.24 111.66 116.12 NA [7,] 94.10 97.88 99.30 107.31 111.69 116.32 NA [8,] 94.18 97.97 100.18 107.35 111.90 116.51 NA [9,] 94.30 98.40 101.37 107.42 111.95 116.63 NA [10,] 94.31 98.51 101.77 107.58 112.04 116.92 NA [11,] 94.36 98.46 102.28 107.64 112.13 116.96 NA [12,] 94.38 98.46 102.38 107.64 112.14 117.15 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.01 0.12 0.12 0.88 0.83 1.46 NA [2,] 0.00 0.07 0.00 2.14 1.86 1.44 NA [3,] 0.06 0.32 0.11 1.25 0.94 0.67 NA [4,] 0.50 1.82 0.42 0.38 0.26 0.40 NA [5,] 0.51 0.86 0.07 0.24 0.09 0.02 NA [6,] 0.21 0.31 0.10 0.07 0.03 0.20 NA [7,] 0.08 0.09 0.88 0.04 0.21 0.19 NA [8,] 0.12 0.43 1.19 0.07 0.05 0.12 NA [9,] 0.01 0.11 0.40 0.16 0.09 0.29 NA [10,] 0.05 -0.05 0.51 0.06 0.09 0.04 NA [11,] 0.02 0.00 0.10 0.00 0.01 0.19 NA [12,] 0.00 0.02 -0.03 0.04 -0.01 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/1zxz01495147701.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/2bhdu1495147701.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/3s9fw1495147701.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/45p3j1495147701.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,] 92.810 92.820 92.820 92.880 93.380 93.89 94.100 94.180 94.300 [2,] 94.380 94.500 94.570 94.890 96.710 97.57 97.880 97.970 98.400 [3,] 100.415 100.915 101.985 102.665 103.065 103.22 103.305 103.765 104.395 [4,] 107.680 108.510 110.370 111.310 111.570 111.66 111.690 111.900 111.950 [5,] 112.130 113.590 115.030 115.700 116.100 116.12 116.320 116.510 116.630 [,10] [,11] [,12] [1,] 94.310 94.36 94.38 [2,] 98.510 98.46 98.46 [3,] 104.675 104.96 105.01 [4,] 112.040 112.13 112.14 [5,] 116.920 116.96 117.15 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 91.83607 91.8781 91.79349 92.07357 93.47982 94.13149 94.3971 [2,] 108.99393 109.9519 112.17651 113.25643 112.65018 112.30851 112.2129 [,8] [,9] [,10] [,11] [,12] [1,] 94.7797 95.65481 95.94771 96.14241 96.18596 [2,] 112.7503 113.13519 113.40229 113.77759 113.83404 $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(92.81, 94.38, 100.415, 107.68, 112.13, 92.82, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/598y01495147701.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.010 0.000 0.060 0.26 0.020 0.03 0.04 0.05 0.010 0.040 0.000 -0.03 [2,] 0.120 0.000 0.110 0.38 0.070 0.07 0.08 0.07 0.090 0.040 0.000 -0.01 [3,] 0.475 0.755 0.495 0.41 0.165 0.15 0.14 0.12 0.135 0.055 0.015 0.00 [4,] 0.880 1.860 0.940 0.50 0.510 0.21 0.21 0.43 0.290 0.090 0.100 0.02 [5,] 1.460 2.140 1.250 0.50 0.860 0.31 0.21 0.43 0.400 0.090 0.190 0.04 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.01522455 -0.4447601 -0.04037681 0.3325961 -0.1188142 0.05969548 [2,] 0.96522455 1.9547601 1.03037681 0.4874039 0.4488142 0.24030452 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.0561458 -0.1122116 0.00599354 0.02274839 -0.04950323 -0.02119792 [2,] 0.2238542 0.3522116 0.26400646 0.08725161 0.07950323 0.02119792 $out [1] 1.82 0.88 1.19 -0.05 0.51 $group [1] 4 7 8 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.00999999999999091, 0.11999999999999, 0.475000000000001, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6s4aq1495147701.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,] 92.810 94.380 98.480 105.370 110.370 113.590 NA [2,] 92.850 94.730 98.655 105.995 110.840 115.365 NA [3,] 93.995 97.725 99.250 107.275 111.675 116.220 NA [4,] 94.305 98.430 101.570 107.500 111.995 116.775 NA [5,] 94.380 98.510 102.380 107.640 112.140 117.150 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 93.33136 96.03741 97.92045 106.5886 111.1482 115.5769 NA [2,] 94.65864 99.41259 100.57955 107.9614 112.2018 116.8631 NA $out [1] 102.35 103.23 107.68 108.51 112.13 $group [1] 4 4 5 5 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(92.81, 92.85, 93.995, 94.305, 94.38, 94.38, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7t6wx1495147701.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,] 101.3050 100.4150 100.8762 [2,] 103.0725 102.3250 102.6700 [3,] 104.3567 103.2625 104.3406 [4,] 105.1000 104.5350 105.0525 [5,] 105.3583 105.0100 105.2275 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 103.4319 102.2545 103.2540 [2,] 105.2814 104.2705 105.4273 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(101.305, 103.0725, 104.356666666667, 105.1, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1zxz01495147701.ps tmp/1zxz01495147701.png",intern=TRUE)) character(0) > try(system("convert tmp/2bhdu1495147701.ps tmp/2bhdu1495147701.png",intern=TRUE)) character(0) > try(system("convert tmp/3s9fw1495147701.ps tmp/3s9fw1495147701.png",intern=TRUE)) character(0) > try(system("convert tmp/45p3j1495147701.ps tmp/45p3j1495147701.png",intern=TRUE)) character(0) > try(system("convert tmp/598y01495147701.ps tmp/598y01495147701.png",intern=TRUE)) character(0) > try(system("convert tmp/6s4aq1495147701.ps tmp/6s4aq1495147701.png",intern=TRUE)) character(0) > try(system("convert tmp/7t6wx1495147701.ps tmp/7t6wx1495147701.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.236 0.382 3.693