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(92.1,93.91,95.46,94.54,95.63,96.32,96.42,96.95,96.52,96.82,96.4,96.69,96.72,98.57,98.6,96.44,97.09,97.36,97.74,96.78,96.45,97.66,98.69,98.21,97.33,99.05,100.09,98.1,97.68,97.44,99.19,98.32,97.83,97.71,97.51,97.62,96.49,98.92,99.69,97.06,97.63,97.97,99.01,97.89,97.23,96.93,96.97,97.68,97.73,99.03,100.35,99.38,99.3,99.77,101.11,101.15,101.59,100.95,99.23,100.41) > 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,] 92.10 96.72 97.33 96.49 97.73 NA [2,] 93.91 98.57 99.05 98.92 99.03 NA [3,] 95.46 98.60 100.09 99.69 100.35 NA [4,] 94.54 96.44 98.10 97.06 99.38 NA [5,] 95.63 97.09 97.68 97.63 99.30 NA [6,] 96.32 97.36 97.44 97.97 99.77 NA [7,] 96.42 97.74 99.19 99.01 101.11 NA [8,] 96.95 96.78 98.32 97.89 101.15 NA [9,] 96.52 96.45 97.83 97.23 101.59 NA [10,] 96.82 97.66 97.71 96.93 100.95 NA [11,] 96.40 98.69 97.51 96.97 99.23 NA [12,] 96.69 98.21 97.62 97.68 100.41 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.81 1.85 1.72 2.43 1.30 NA [2,] 1.55 0.03 1.04 0.77 1.32 NA [3,] -0.92 -2.16 -1.99 -2.63 -0.97 NA [4,] 1.09 0.65 -0.42 0.57 -0.08 NA [5,] 0.69 0.27 -0.24 0.34 0.47 NA [6,] 0.10 0.38 1.75 1.04 1.34 NA [7,] 0.53 -0.96 -0.87 -1.12 0.04 NA [8,] -0.43 -0.33 -0.49 -0.66 0.44 NA [9,] 0.30 1.21 -0.12 -0.30 -0.64 NA [10,] -0.42 1.03 -0.20 0.04 -1.72 NA [11,] 0.29 -0.48 0.11 0.71 1.18 NA [12,] 0.03 -0.88 -1.13 0.05 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/154gc1476380190.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/2zcyu1476380190.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/3z6tn1476380190.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/45dp21476380190.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] [,11] [,12] [1,] 96.49 98.57 98.60 94.54 97.09 97.36 96.42 96.78 96.45 96.82 96.40 97.62 [2,] 96.49 98.57 98.60 96.44 97.09 97.36 97.74 96.95 96.52 96.93 96.97 97.62 [3,] 96.72 98.92 99.69 97.06 97.63 97.44 99.01 97.89 97.23 97.66 97.51 97.68 [4,] 97.33 99.03 100.09 98.10 97.68 97.97 99.19 98.32 97.83 97.71 98.69 98.21 [5,] 97.73 99.05 100.35 99.38 97.68 97.97 101.11 98.32 97.83 97.71 99.23 98.21 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 96.12646 98.59497 98.63717 95.88705 97.21311 97.00898 97.98543 96.92196 [2,] 97.31354 99.24503 100.74283 98.23295 98.04689 97.87102 100.03457 98.85804 [,9] [,10] [,11] [,12] [1,] 96.30436 97.10885 96.29465 97.26311 [2,] 98.15564 98.21115 98.72535 98.09689 $out [1] 92.10 93.91 95.46 95.63 99.30 96.32 99.77 101.15 101.59 100.95 [11] 96.69 100.41 $group [1] 1 2 3 5 5 6 6 8 9 10 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(96.49, 96.49, 96.72, 97.33, 97.73, 98.57, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5zlrc1476380190.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,] 1.72 0.03 -2.63 -0.42 0.27 0.10 -1.12 -0.66 -0.64 -0.42 -0.48 -1.130 [2,] 1.72 0.77 -2.16 -0.08 0.27 0.38 -0.96 -0.49 -0.30 -0.42 0.11 -1.005 [3,] 1.81 1.04 -1.99 0.57 0.34 1.04 -0.87 -0.43 -0.12 -0.20 0.29 -0.425 [4,] 1.85 1.32 -0.97 0.65 0.47 1.34 0.04 -0.33 0.30 0.04 0.71 0.040 [5,] 1.85 1.55 -0.92 1.09 0.69 1.75 0.53 -0.33 0.30 0.04 1.18 0.050 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.718142 0.6513714 -2.830851 0.05418384 0.1986805 0.3616664 -1.5765975 [2,] 1.901858 1.4286286 -1.149149 1.08581616 0.4813195 1.7183336 -0.1634025 [,8] [,9] [,10] [,11] [,12] [1,] -0.5430556 -0.5439585 -0.5250348 -0.1339585 -1.25055 [2,] -0.3169444 0.3039585 0.1250348 0.7139585 0.40055 $out [1] 2.43 1.30 -0.24 0.44 1.21 1.03 -1.72 $group [1] 1 1 5 8 9 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1.72, 1.72, 1.81, 1.84999999999999, 1.84999999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6jmeh1476380190.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,] 93.910 96.44 97.330 96.490 97.730 NA [2,] 95.000 96.75 97.565 97.015 99.265 NA [3,] 96.360 97.51 97.770 97.655 100.060 NA [4,] 96.605 98.39 98.685 98.445 101.030 NA [5,] 96.950 98.69 100.090 99.690 101.590 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 95.62795 96.76198 97.25916 97.00277 99.25497 NA [2,] 97.09205 98.25802 98.28084 98.30723 100.86503 NA $out [1] 92.1 $group [1] 1 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(93.91, 95, 96.36, 96.605, 96.95, 96.44, 96.75, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7s2cw1476380190.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,] 97.104 96.720 96.910 [2,] 97.613 97.335 97.295 [3,] 97.910 97.645 97.650 [4,] 98.170 98.405 98.190 [5,] 98.838 99.690 99.345 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 97.65595 97.15697 97.24178 [2,] 98.16405 98.13303 98.05822 $out [1] 96.074 $group [1] 1 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(97.104, 97.613, 97.91, 98.17, 98.838, 96.72, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/154gc1476380190.ps tmp/154gc1476380190.png",intern=TRUE)) character(0) > try(system("convert tmp/2zcyu1476380190.ps tmp/2zcyu1476380190.png",intern=TRUE)) character(0) > try(system("convert tmp/3z6tn1476380190.ps tmp/3z6tn1476380190.png",intern=TRUE)) character(0) > try(system("convert tmp/45dp21476380190.ps tmp/45dp21476380190.png",intern=TRUE)) character(0) > try(system("convert tmp/5zlrc1476380190.ps tmp/5zlrc1476380190.png",intern=TRUE)) character(0) > try(system("convert tmp/6jmeh1476380190.ps tmp/6jmeh1476380190.png",intern=TRUE)) character(0) > try(system("convert tmp/7s2cw1476380190.ps tmp/7s2cw1476380190.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.702 0.156 2.922