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(97.91,98.51,98.54,98.52,98.66,98.53,98.71,98.92,98.96,99.25,99.32,99.41,99.36,99.58,99.77,99.77,100.03,100.2,100.24,100.1,100.03,100.18,100.29,100.41,100.6,100.75,100.79,100.44,100.29,100.34,100.46,100.12,100.06,100.28,100.28,100.4,100.61,100.89,100.73,101.12,101.16,101.33,101.37,101.61,101.85,102.27,102.28,102.23,102.42,102.53,103.47,103.53,103.77,103.74,103.93,103.97,103.68,103.86,103.97,104.05) > 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,] 97.91 99.36 100.60 100.61 102.42 NA [2,] 98.51 99.58 100.75 100.89 102.53 NA [3,] 98.54 99.77 100.79 100.73 103.47 NA [4,] 98.52 99.77 100.44 101.12 103.53 NA [5,] 98.66 100.03 100.29 101.16 103.77 NA [6,] 98.53 100.20 100.34 101.33 103.74 NA [7,] 98.71 100.24 100.46 101.37 103.93 NA [8,] 98.92 100.10 100.12 101.61 103.97 NA [9,] 98.96 100.03 100.06 101.85 103.68 NA [10,] 99.25 100.18 100.28 102.27 103.86 NA [11,] 99.32 100.29 100.28 102.28 103.97 NA [12,] 99.41 100.41 100.40 102.23 104.05 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.60 0.22 0.15 0.28 0.11 NA [2,] 0.03 0.19 0.04 -0.16 0.94 NA [3,] -0.02 0.00 -0.35 0.39 0.06 NA [4,] 0.14 0.26 -0.15 0.04 0.24 NA [5,] -0.13 0.17 0.05 0.17 -0.03 NA [6,] 0.18 0.04 0.12 0.04 0.19 NA [7,] 0.21 -0.14 -0.34 0.24 0.04 NA [8,] 0.04 -0.07 -0.06 0.24 -0.29 NA [9,] 0.29 0.15 0.22 0.42 0.18 NA [10,] 0.07 0.11 0.00 0.01 0.11 NA [11,] 0.09 0.12 0.12 -0.05 0.08 NA [12,] -0.05 0.19 0.21 0.19 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/1385s1489840283.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/2ihet1489840283.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/3i8no1489840283.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/4bwra1489840283.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,] 97.91 98.51 98.54 98.52 98.66 98.53 98.71 98.92 98.96 99.25 [2,] 99.36 99.58 99.77 99.77 100.03 100.20 100.24 100.10 100.03 100.18 [3,] 100.60 100.75 100.73 100.44 100.29 100.34 100.46 100.12 100.06 100.28 [4,] 100.61 100.89 100.79 101.12 101.16 101.33 101.37 101.61 101.85 102.27 [5,] 102.42 102.53 100.79 101.12 101.16 101.33 101.37 101.61 103.68 103.86 [,11] [,12] [1,] 99.32 99.41 [2,] 100.28 100.40 [3,] 100.29 100.41 [4,] 102.28 102.23 [5,] 103.97 104.05 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 99.71675 99.82436 100.0093 99.48609 99.49154 99.54154 99.66154 [2,] 101.48325 101.67564 101.4507 101.39391 101.08846 101.13846 101.25846 [,8] [,9] [,10] [,11] [,12] [1,] 99.05304 98.77399 98.80321 98.87681 99.11693 [2,] 101.18696 101.34601 101.75679 101.70319 101.70307 $out [1] 103.47 103.53 103.77 103.74 103.93 103.97 $group [1] 3 4 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(97.91, 99.36, 100.6, 100.61, 102.42, 98.51, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5mm7t1489840283.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.11 -0.16 -0.02 -0.15 -0.13 0.04 -0.34 -0.07 0.15 0.00 0.08 -0.05 [2,] 0.15 0.03 -0.02 0.04 -0.03 0.04 -0.14 -0.07 0.18 0.01 0.08 0.07 [3,] 0.22 0.04 0.00 0.14 0.05 0.12 0.04 -0.06 0.22 0.07 0.09 0.19 [4,] 0.28 0.19 0.06 0.24 0.17 0.18 0.21 0.04 0.29 0.11 0.12 0.20 [5,] 0.28 0.19 0.06 0.26 0.17 0.19 0.24 0.04 0.42 0.11 0.12 0.21 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.1281423 -0.0730556 -0.0565278 -0.001319496 -0.0913195 0.02107635 [2,] 0.3118577 0.1530556 0.0565278 0.281319496 0.1913195 0.21892365 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.2073091 -0.13772572 0.1422743 -0.0006597481 0.0617361 0.0873 [2,] 0.2873091 0.01772572 0.2977257 0.1406597481 0.1182639 0.2927 $out [1] 0.60 0.94 -0.35 0.39 0.24 -0.29 -0.05 $group [1] 1 2 3 3 8 8 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.109999999999999, 0.150000000000006, 0.219999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6czp01489840283.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,] 97.910 99.360 100.06 100.610 103.470 NA [2,] 98.525 99.770 100.28 101.005 103.500 NA [3,] 98.685 100.065 100.37 101.350 103.755 NA [4,] 99.105 100.220 100.53 102.040 103.950 NA [5,] 99.410 100.410 100.79 102.280 104.050 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 98.42046 99.85975 100.256 100.8779 103.5498 NA [2,] 98.94954 100.27025 100.484 101.8221 103.9602 NA $out [1] 102.42 102.53 $group [1] 5 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(97.91, 98.525, 98.685, 99.105, 99.41, 99.36, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7zx331489840283.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,] 100.180 100.060 99.9850 [2,] 100.668 100.285 100.3625 [3,] 100.872 100.375 100.7850 [4,] 101.056 100.530 101.0825 [5,] 101.300 100.750 101.3150 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 100.695 100.2633 100.4566 [2,] 101.049 100.4867 101.1134 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(100.18, 100.668, 100.872, 101.056, 101.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1385s1489840283.ps tmp/1385s1489840283.png",intern=TRUE)) character(0) > try(system("convert tmp/2ihet1489840283.ps tmp/2ihet1489840283.png",intern=TRUE)) character(0) > try(system("convert tmp/3i8no1489840283.ps tmp/3i8no1489840283.png",intern=TRUE)) character(0) > try(system("convert tmp/4bwra1489840283.ps tmp/4bwra1489840283.png",intern=TRUE)) character(0) > try(system("convert tmp/5mm7t1489840283.ps tmp/5mm7t1489840283.png",intern=TRUE)) character(0) > try(system("convert tmp/6czp01489840283.ps tmp/6czp01489840283.png",intern=TRUE)) character(0) > try(system("convert tmp/7zx331489840283.ps tmp/7zx331489840283.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.908 0.272 3.274