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.76,93.12,93.6,93.24,93.4,93.32,93.13,93.19,93.84,94.01,93.78,93.47,93.6,92.85,92.91,92.29,92.5,93.1,92.86,93.19,93.73,93.88,93.85,93.45,93.43,93.59,95.28,94.95,94.49,94.45,94.35,95.52,96.89,97.54,97.65,97.35,98.2,99.46,100.35,99.72,99.69,99.62,99.77,100.19,100.82,100.36,101.08,100.73,101.51,102.12,102.88,103.47,103.53,103.67,103.68,103.76,103.67,103.01,103.39,103.43,103.4,104.8) > 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] 62 > (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] 6 6 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 92.76 93.60 93.43 98.20 101.51 103.4 [2,] 93.12 92.85 93.59 99.46 102.12 104.8 [3,] 93.60 92.91 95.28 100.35 102.88 NA [4,] 93.24 92.29 94.95 99.72 103.47 NA [5,] 93.40 92.50 94.49 99.69 103.53 NA [6,] 93.32 93.10 94.45 99.62 103.67 NA [7,] 93.13 92.86 94.35 99.77 103.68 NA [8,] 93.19 93.19 95.52 100.19 103.76 NA [9,] 93.84 93.73 96.89 100.82 103.67 NA [10,] 94.01 93.88 97.54 100.36 103.01 NA [11,] 93.78 93.85 97.65 101.08 103.39 NA [12,] 93.47 93.45 97.35 100.73 103.43 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.36 -0.75 0.16 1.26 0.61 1.4 [2,] 0.48 0.06 1.69 0.89 0.76 NA [3,] -0.36 -0.62 -0.33 -0.63 0.59 NA [4,] 0.16 0.21 -0.46 -0.03 0.06 NA [5,] -0.08 0.60 -0.04 -0.07 0.14 NA [6,] -0.19 -0.24 -0.10 0.15 0.01 NA [7,] 0.06 0.33 1.17 0.42 0.08 NA [8,] 0.65 0.54 1.37 0.63 -0.09 NA [9,] 0.17 0.15 0.65 -0.46 -0.66 NA [10,] -0.23 -0.03 0.11 0.72 0.38 NA [11,] -0.31 -0.40 -0.30 -0.35 0.04 NA [12,] 0.13 -0.02 0.85 0.78 -0.03 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/1vhyg1489840288.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/2y6ap1489840288.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/3c9qj1489840288.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/4xqot1489840288.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,] 92.76 92.850 92.91 92.29 92.50 93.10 92.86 93.19 93.73 93.88 [2,] 93.43 93.120 93.60 93.24 93.40 93.32 93.13 93.19 93.84 94.01 [3,] 95.90 96.525 95.28 94.95 94.49 94.45 94.35 95.52 96.89 97.54 [4,] 101.51 102.120 100.35 99.72 99.69 99.62 99.77 100.19 100.82 100.36 [5,] 103.40 104.800 102.88 103.47 103.53 103.67 103.68 103.76 103.67 103.01 [,11] [,12] [1,] 93.78 93.45 [2,] 93.85 93.47 [3,] 97.65 97.35 [4,] 101.08 100.73 [5,] 103.39 103.43 $n [1] 6 6 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 90.68814 90.71971 90.51047 90.37125 90.0455 89.99844 89.65819 90.57382 [2,] 101.11186 102.33029 100.04953 99.52875 98.9345 98.90156 99.04181 100.46618 [,9] [,10] [,11] [,12] [1,] 91.95795 93.05311 92.5413 92.2201 [2,] 101.82205 102.02689 102.7587 102.4799 $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.76, 93.43, 95.9, 101.51, 103.4, 92.85, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5rxxa1489840288.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.750 0.06 -0.63 -0.03 -0.08 -0.24 0.06 0.54 -0.66 -0.23 -0.40 -0.03 [2,] 0.160 0.48 -0.62 -0.03 -0.07 -0.19 0.08 0.54 -0.46 -0.03 -0.35 -0.02 [3,] 0.485 0.76 -0.36 0.06 -0.04 -0.10 0.33 0.63 0.15 0.11 -0.31 0.13 [4,] 1.260 0.89 -0.33 0.16 0.14 0.01 0.42 0.65 0.17 0.38 -0.30 0.78 [5,] 1.400 0.89 -0.33 0.21 0.14 0.15 0.42 0.65 0.65 0.72 -0.30 0.85 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.2245355 0.470295 -0.5649133 -0.07425352 -0.1883855 -0.2413195 [2,] 1.1945355 1.049705 -0.1550867 0.19425352 0.1083855 0.0413195 [,7] [,8] [,9] [,10] [,11] [,12] [1,] 0.08975686 0.5522743 -0.2951564 -0.179705 -0.3453299 -0.435278 [2,] 0.57024314 0.7077257 0.5951564 0.399705 -0.2746701 0.695278 $out [1] 1.69 0.59 -0.46 0.60 1.17 1.37 -0.09 0.04 $group [1] 2 3 4 5 7 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.75, 0.159999999999997, 0.484999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/63wxp1489840288.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,] 92.76 92.290 93.430 99.460 102.120 103.4 [2,] 93.16 92.855 94.400 99.655 102.945 103.4 [3,] 93.36 93.145 95.115 99.980 103.450 104.1 [4,] 93.69 93.665 97.120 100.545 103.670 104.8 [5,] 94.01 93.880 97.650 101.080 103.760 104.8 $n [1] 12 12 12 12 12 2 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 93.11826 92.77555 93.87439 99.57407 103.1193 102.5359 [2,] 93.60174 93.51445 96.35561 100.38593 103.7807 105.6641 $out [1] 98.20 101.51 $group [1] 4 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(92.76, 93.16, 93.36, 93.69, 94.01, 92.29, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7c4051489840288.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,] 96.722 94.35 96.45000 [2,] 96.795 94.72 96.51250 [3,] 97.160 95.71 97.02625 [4,] 97.723 97.12 97.25750 [5,] 97.950 97.65 97.46500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 96.73673 94.61534 96.68645 [2,] 97.58327 96.80466 97.36605 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(96.722, 96.795, 97.16, 97.723, 97.95, 94.35, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1vhyg1489840288.ps tmp/1vhyg1489840288.png",intern=TRUE)) character(0) > try(system("convert tmp/2y6ap1489840288.ps tmp/2y6ap1489840288.png",intern=TRUE)) character(0) > try(system("convert tmp/3c9qj1489840288.ps tmp/3c9qj1489840288.png",intern=TRUE)) character(0) > try(system("convert tmp/4xqot1489840288.ps tmp/4xqot1489840288.png",intern=TRUE)) character(0) > try(system("convert tmp/5rxxa1489840288.ps tmp/5rxxa1489840288.png",intern=TRUE)) character(0) > try(system("convert tmp/63wxp1489840288.ps tmp/63wxp1489840288.png",intern=TRUE)) character(0) > try(system("convert tmp/7c4051489840288.ps tmp/7c4051489840288.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.782 0.215 3.060