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(102.59,102.91,101.94,101.8,102.25,102.6,102.49,102.13,100.76,100.86,101.12,100.74,99.99,99.39,99.52,99.21,99.38,99.37,99.38,99.26,99.36,99.2,98.53,98.65,99.15,100.17,99.98,100.07,99.94,100.05,99.13,98.74,98.64,98.44,98.81,98.88,99.63,100.08,100.07,100.55,99.98,99.89,99.86,99.61,100.12,100.24,100.1,99.86,97.99,97.57,98.28,97.97,97.99,97.84,97.33,96.7,96.79,96.76,96.23,96.29,96.46,97.23,97.59,97.13,97.37,96.12,96.96,96.7,97,97.15,96.51,96.68) > 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,] 102.59 99.99 99.15 99.63 97.99 96.46 NA [2,] 102.91 99.39 100.17 100.08 97.57 97.23 NA [3,] 101.94 99.52 99.98 100.07 98.28 97.59 NA [4,] 101.80 99.21 100.07 100.55 97.97 97.13 NA [5,] 102.25 99.38 99.94 99.98 97.99 97.37 NA [6,] 102.60 99.37 100.05 99.89 97.84 96.12 NA [7,] 102.49 99.38 99.13 99.86 97.33 96.96 NA [8,] 102.13 99.26 98.74 99.61 96.70 96.70 NA [9,] 100.76 99.36 98.64 100.12 96.79 97.00 NA [10,] 100.86 99.20 98.44 100.24 96.76 97.15 NA [11,] 101.12 98.53 98.81 100.10 96.23 96.51 NA [12,] 100.74 98.65 98.88 99.86 96.29 96.68 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.32 -0.60 1.02 0.45 -0.42 0.77 NA [2,] -0.97 0.13 -0.19 -0.01 0.71 0.36 NA [3,] -0.14 -0.31 0.09 0.48 -0.31 -0.46 NA [4,] 0.45 0.17 -0.13 -0.57 0.02 0.24 NA [5,] 0.35 -0.01 0.11 -0.09 -0.15 -1.25 NA [6,] -0.11 0.01 -0.92 -0.03 -0.51 0.84 NA [7,] -0.36 -0.12 -0.39 -0.25 -0.63 -0.26 NA [8,] -1.37 0.10 -0.10 0.51 0.09 0.30 NA [9,] 0.10 -0.16 -0.20 0.12 -0.03 0.15 NA [10,] 0.26 -0.67 0.37 -0.14 -0.53 -0.64 NA [11,] -0.38 0.12 0.07 -0.24 0.06 0.17 NA [12,] -0.75 0.50 0.75 -1.87 0.17 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/1ob5u1476200473.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/28pt61476200473.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/3ylg01476200473.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/4y60o1476200473.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,] 96.46 97.230 97.59 97.13 97.37 96.12 96.960 96.70 96.79 96.76 [2,] 97.99 97.570 98.28 97.97 97.99 97.84 97.330 96.70 97.00 97.15 [3,] 99.39 99.735 99.75 99.64 99.66 99.63 99.255 99.00 99.00 98.82 [4,] 99.99 100.170 100.07 100.55 99.98 100.05 99.860 99.61 100.12 100.24 [5,] 102.59 102.910 101.94 101.80 102.25 102.60 102.490 102.13 100.76 100.86 [,11] [,12] [1,] 96.23 96.290 [2,] 96.51 96.680 [3,] 98.67 98.765 [4,] 100.10 99.860 [5,] 101.12 100.740 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 98.09994 98.05792 98.59539 97.97582 98.37639 98.20448 97.62307 [2,] 100.68006 101.41208 100.90461 101.30418 100.94361 101.05552 100.88693 [,8] [,9] [,10] [,11] [,12] [1,] 97.12296 96.9875 96.82685 96.35433 96.7138 [2,] 100.87704 101.0125 100.81315 100.98567 100.8162 $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(96.46, 97.99, 99.39, 99.99, 102.59, 97.23, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5nfti1476200473.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.600 -0.97 -0.460 -0.570 -0.15 -0.92 -0.39 -0.100 -0.200 -0.670 -0.380 [2,] -0.420 -0.19 -0.310 -0.130 -0.15 -0.51 -0.39 -0.100 -0.160 -0.640 -0.240 [3,] 0.385 0.06 -0.225 0.095 -0.05 -0.07 -0.31 0.095 0.035 -0.335 0.065 [4,] 0.770 0.36 0.090 0.240 0.11 0.01 -0.25 0.300 0.120 0.260 0.120 [5,] 1.020 0.71 0.480 0.450 0.35 0.01 -0.12 0.510 0.150 0.370 0.170 [,12] [1,] -1.87 [2,] -0.75 [3,] 0.17 [4,] 0.50 [5,] 0.75 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.3825884 -0.2947678 -0.48301292 -0.143662 -0.2177084 -0.4054168 [2,] 1.1525884 0.4147678 0.03301292 0.333662 0.1177084 0.2654168 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.4003045 -0.1630129 -0.145609 -0.9155291 -0.1672116 -0.7132469 [2,] -0.2196955 0.3530129 0.215609 0.2455291 0.2972116 1.0532469 $out [1] -1.25 0.84 -0.63 -1.37 $group [1] 5 6 7 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.599999999999994, -0.420000000000002, 0.384999999999998, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6e8ah1476200473.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,] 100.740 99.200 98.440 99.610 96.23 96.120 NA [2,] 100.990 99.205 98.775 99.860 96.73 96.595 NA [3,] 102.035 99.365 99.140 100.025 97.45 96.980 NA [4,] 102.540 99.385 100.015 100.110 97.98 97.190 NA [5,] 102.910 99.520 100.170 100.240 98.28 97.590 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 101.328 99.2829 98.57443 99.91097 96.87987 96.70862 NA [2,] 102.742 99.4471 99.70557 100.13903 98.02013 97.25138 NA $out [1] 99.99 98.53 98.65 100.55 $group [1] 2 2 2 4 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(100.74, 100.99, 102.035, 102.54, 102.91, 99.2, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7xoj61476200473.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.51667 98.6700 98.36625 [2,] 98.77667 98.9100 98.53313 [3,] 99.24667 99.3225 98.92312 [4,] 99.47000 99.6500 99.13500 [5,] 99.56333 99.7500 99.35500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 98.93043 98.98498 98.64861 [2,] 99.56290 99.66002 99.19764 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(98.5166666666667, 98.7766666666667, 99.2466666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1ob5u1476200473.ps tmp/1ob5u1476200473.png",intern=TRUE)) character(0) > try(system("convert tmp/28pt61476200473.ps tmp/28pt61476200473.png",intern=TRUE)) character(0) > try(system("convert tmp/3ylg01476200473.ps tmp/3ylg01476200473.png",intern=TRUE)) character(0) > try(system("convert tmp/4y60o1476200473.ps tmp/4y60o1476200473.png",intern=TRUE)) character(0) > try(system("convert tmp/5nfti1476200473.ps tmp/5nfti1476200473.png",intern=TRUE)) character(0) > try(system("convert tmp/6e8ah1476200473.ps tmp/6e8ah1476200473.png",intern=TRUE)) character(0) > try(system("convert tmp/7xoj61476200473.ps tmp/7xoj61476200473.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.569 0.182 2.800